Revision 1870
Added by Dietmar almost 12 years ago
WbAutoloader.php | ||
---|---|---|
14 | 14 |
* Register WB - CoreAutoloader as SPL autoloader |
15 | 15 |
* @param array $aDirectories list of 'directory'=>'shortKey' |
16 | 16 |
*/ |
17 |
static public function doRegister(array $aDirectories) |
|
18 |
{ |
|
19 |
if(sizeof($aDirectories > 0)) { |
|
20 |
self::$_aSearchpatterns[] = '/(^.[^_].*$)/i'; |
|
21 |
self::$_aReplacements[] = basename(dirname(__FILE__)).'_$1'; |
|
22 |
foreach($aDirectories as $value => $shortKey) { |
|
23 |
self::$_aSearchpatterns[] = '/^'.$shortKey.'_/i'; |
|
24 |
self::$_aReplacements[] = $value.'_'; |
|
17 |
static public function doRegister(array $aDirectories) |
|
18 |
{ |
|
19 |
if(!sizeof(self::$_aSearchpatterns)) { |
|
20 |
if(sizeof($aDirectories > 0)) { |
|
21 |
self::$_aSearchpatterns[] = '/(^.[^_].*$)/i'; |
|
22 |
self::$_aReplacements[] = basename(dirname(__FILE__)).'_$1'; |
|
23 |
foreach($aDirectories as $value => $shortKey) { |
|
24 |
self::$_aSearchpatterns[] = '/^'.$shortKey.'_/i'; |
|
25 |
self::$_aReplacements[] = $value.'_'; |
|
26 |
} |
|
25 | 27 |
} |
26 | 28 |
} |
27 |
spl_autoload_register(array(new self, 'CoreAutoloader'));
|
|
28 |
}
|
|
29 |
spl_autoload_register(array(new self, 'CoreAutoloader'));
|
|
30 |
}
|
|
29 | 31 |
/** |
30 | 32 |
* tries autoloading the given class |
31 | 33 |
* @param string $sClassName |
Also available in: Unified diff
! upgrade-script sanitize pages_directory before creating access files