Changeset View
Changeset View
Standalone View
Standalone View
branches/5.3.x/core/kernel/utility/factory.php
Show First 20 Lines • Show All 341 Lines • ▼ Show 20 Line(s) | |||||
* | * | ||||
* @return kBase | * @return kBase | ||||
* @throws kFactoryException When class not found. | * @throws kFactoryException When class not found. | ||||
*/ | */ | ||||
public function makeClass($pseudo_class, $arguments = Array ()) | public function makeClass($pseudo_class, $arguments = Array ()) | ||||
{ | { | ||||
if ( !isset($this->realClasses[$pseudo_class]) ) { | if ( !isset($this->realClasses[$pseudo_class]) ) { | ||||
$error_msg = 'RealClass not defined for "<strong>' . $pseudo_class . '</strong>" pseudo_class.'; | $error_msg = 'RealClass not defined for "<strong>' . $pseudo_class . '</strong>" pseudo_class.'; | ||||
$error_msg .= ' Please use "<strong>php tools/build_class_map.php</strong>" to discover new classes.'; | $error_msg .= ' Please use "<strong>in-portal classmap:rebuild</strong>" command to discover new classes.'; | ||||
if ( $this->Application->isInstalled() ) { | if ( $this->Application->isInstalled() ) { | ||||
throw new kFactoryException($error_msg); | throw new kFactoryException($error_msg); | ||||
} | } | ||||
else { | else { | ||||
if ( $this->Application->isDebugMode() ) { | if ( $this->Application->isDebugMode() ) { | ||||
$this->Application->Debugger->appendTrace(); | $this->Application->Debugger->appendTrace(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |