Definition at line 10 of file ClassMap.php.
◆ __construct()
Set base directory absolute path
- Parameters
-
- Exceptions
-
Definition at line 36 of file ClassMap.php.
38 $this->_baseDir = realpath(
$baseDir);
39 if (!$this->_baseDir || !
is_dir($this->_baseDir)) {
40 throw new \InvalidArgumentException(
"Specified path is not a valid directory: '{$baseDir}'");
◆ addMap()
Add classes files declaration to the map. New map will override existing values if such was defined before.
- Parameters
-
- Returns
- $this
Definition at line 64 of file ClassMap.php.
66 $this->_map = array_merge($this->_map,
$map);
◆ getFile()
Find an absolute path to a file to be included
- Parameters
-
- Returns
- string|bool
Definition at line 50 of file ClassMap.php.
52 if (isset($this->_map[
$class])) {
53 return $this->_baseDir .
'/' . $this->_map[
$class];
$_option $_optionId $class
◆ load()
Resolve a class file and include it
- Parameters
-
- Returns
- void
Definition at line 76 of file ClassMap.php.
79 if (file_exists($file)) {
$_option $_optionId $class
◆ $_baseDir
◆ $_map
The documentation for this class was generated from the following file: