4.5. Opl_Loader class
4.5.8. mapAbsolute()
4.5.7. map()
« Previous
4.5.9. mapLibrary()
Next »

4.5.8. mapAbsolute()

ConstructStatic method
Visibilitypublic
Referencevoid Opl_Loader::map( string $className, string $file )
Argument list
$className - string
The class name to map.
$file - string
The file with the class.
Versionssince 2.0-beta2

Allows to specify the path to the class $className manually, ignoring the library directory settings.

A comparison example:

Opl_Loader::setDirectory('../libs/');
 
Opl_Loader::map('Opx_Class1', 'Some/File.php');
Opl_Loader::mapAbsolute('Opx_Class2', '../libs2/file.php');
 
// Loaded from `../libs/Opx/Some/File.php`
$item = new Opx_Class1;
 
// Loaded from `../libs2/file.php`
$item = new Opx_Class2;

See also:

4.5.8. mapAbsolute()
4.5. Opl_Loader class
« Previous
4.5.7. map()
Next »
4.5.9. mapLibrary()