Créer un compte ou loggez-vous pour pouvoir ajouter, commenter et noter les snippets.

Navigation

Tags relatifs

my Symfony Plugins

Plugins demos


My bookmarks

Vous pouvez commenter/noter en utilisant le compte anonymous (mot de passe: anonymous)
You can comment/rate using the anonymous account (password: anonymous).

Snippets taggés : "pear" Snippets taggés : "pear"

[PEAR] Forcer la version installée de symfony - 386 view(s)

pear install -f symfony/symfony-1.2.4
par COil le 2009-03-24, taggé : pear  php  symfony 
(1 commentaire)

[Pear] Display source code of all php files of a package - 441 view(s)

You will need the original package.xml, it can be usefull for package maintainers to provide source of their package as i did for my PHP_Debug pkg

// file
function showSource($dir, $file)
{
    $path = $dir. $file;
    print('<div>');
    print('<h1>'. $path. '</h1>');
    highlight_file($path);
    print('</div>'. "\n");
}
 
// Dir 
function parseDir($dir, $parent)
{
    $path = $parent. ($dir['name'] != '/' ? $dir['name']. '/' : '');
    foreach($dir->file as $file) {
        if (in_array($file['role'], array('test', 'php'))) {
            showSource($path, $file['name']);
        }
    }   
    foreach($dir->dir as $child) {
        parseDir($child, $path);
    }
    return;
}
 
$package = simplexml_load_file('package.xml');
$dir = '';
parseDir($package->contents->dir, $dir);
 
par COil le 2008-09-28, taggé : package  pear  php  release  xml 
(1 commentaire)
Debug toolbar