Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/utility/factory.php
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Line(s) | |||||
return true; | return true; | ||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
/** | /** | ||||
* Finds the absolute path to the file where the class is defined. | |||||
* | |||||
* @param string $class The name of the class. | |||||
* | |||||
* @return string|false | |||||
*/ | |||||
public function findClassFile($class) | |||||
{ | |||||
$file = $this->findFile($class); | |||||
if ( $file ) { | |||||
return FULL_PATH . $file; | |||||
} | |||||
return false; | |||||
} | |||||
/** | |||||
* Finds the path to the file where the class is defined. | * Finds the path to the file where the class is defined. | ||||
* | * | ||||
* @param string $class The name of the class | * @param string $class The name of the class | ||||
* @return string|bool The path if found, false otherwise | * @return string|bool The path if found, false otherwise | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function findFile($class) | protected function findFile($class) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 243 Lines • ▼ Show 20 Line(s) | |||||
{ | { | ||||
unset($this->classMap[$real_class]); | unset($this->classMap[$real_class]); | ||||
} | } | ||||
} | } | ||||
class kFactoryException extends Exception { | class kFactoryException extends Exception { | ||||
} | } | ||||
No newline at end of file |