* $gen = new AutoloadGenerator( __DIR__ );
* $gen->readDir( __DIR__ . '/includes' );
* $gen->readFile( __DIR__ . '/foo.php' )
- * $gen->generateAutoload();
+ * $gen->getAutoload();
*/
class AutoloadGenerator {
const FILETYPE_JSON = 'json';
*
* @param {string} $commandName Command name to include in comment
* @param {string} $filename of PHP file to put autoload information in.
+ * @return string
*/
protected function generatePHPAutoload( $commandName, $filename ) {
// No existing JSON file found; update/generate PHP file
foreach ( glob( $this->basepath . '/*.php' ) as $file ) {
$this->readFile( $file );
}
+
+ // Legacy aliases
+ $this->forceClassPath( 'DatabaseBase',
+ $this->basepath . '/includes/libs/rdbms/database/Database.php' );
}
}