コード例 #1
0
function main()
{
    $base = __DIR__;
    $generator = new AutoloadGenerator($base);
    foreach (array('includes', 'tests/phpunit/mocks') as $dir) {
        $generator->readDir($base . '/' . $dir);
    }
    $generator->generateAutoload($base);
    echo "Done.\n\n";
}
コード例 #2
0
function main()
{
    $base = __DIR__ . '/lib';
    $generator = new AutoloadGenerator($base);
    foreach (array('oojs-ui/php') as $dir) {
        $generator->readDir($base . '/' . $dir);
    }
    $generator->generateAutoload($base);
    echo "Done.\n\n";
}
function main()
{
    $base = dirname(__DIR__);
    $generator = new AutoloadGenerator($base);
    foreach (array('includes', 'maintenance') as $dir) {
        $generator->readDir($base . '/' . $dir);
    }
    foreach (glob($base . '/*.php') as $file) {
        $generator->readFile($file);
    }
    $generator->generateAutoload(basename(__DIR__) . '/' . basename(__FILE__));
    echo "Done.\n\n";
}
コード例 #4
0
function main()
{
    $base = dirname(__DIR__);
    $generator = new AutoloadGenerator($base);
    foreach (array('includes', 'tests/phpunit', 'vendor') as $dir) {
        $generator->readDir($base . '/' . $dir);
    }
    foreach (glob($base . '/*.php') as $file) {
        $generator->readFile($file);
    }
    // read entire maint dir, move helper to includes? to core?
    $generator->readFile($base . '/maintenance/MaintenanceDebugLogger.php');
    $generator->generateAutoload(basename(__DIR__) . '/' . basename(__FILE__));
    echo "Done.\n\n";
}
コード例 #5
0
<?php

if (PHP_SAPI != 'cli') {
    die("This script can only be run from the command line.\n");
}
require_once __DIR__ . '/../includes/utils/AutoloadGenerator.php';
// Mediawiki installation directory
$base = dirname(__DIR__);
$generator = new AutoloadGenerator($base, 'local');
foreach (array('includes', 'languages', 'maintenance', 'mw-config') as $dir) {
    $generator->readDir($base . '/' . $dir);
}
foreach (glob($base . '/*.php') as $file) {
    $generator->readFile($file);
}
// This class is not defined, but might be added by the installer
$generator->forceClassPath('MyLocalSettingsGenerator', "{$base}/mw-config/overrides.php");
// Write out the autoload
$generator->generateAutoload('maintenance/generateLocalAutoload.php');