loadClass() public method

Called when there is a class to load
public loadClass ( string $name ) : boolean
$name string
return boolean
 /**
  * Loads the class by first checking if the file path is cached.
  * @param string $class Full name of the class
  * @return bool|null True if the class was loaded, false if not
  */
 public function loadClass($class)
 {
     $result = $this->loadCachedClass($class);
     if ($result === false) {
         $result = parent::loadClass($class);
     }
     if ($this->verbose) {
         return $result !== false;
     }
 }
 /**
  * 
  *
  * @param ClassLoader $classLoader
  * @param string $qualifiedSerialzierName
  * @return ReflectionClass
  */
 private static function getCustomFieldSerializer(ClassLoader $classLoader, $qualifiedSerialzierName)
 {
     try {
         /*ReflectionClass*/
         $customSerializerClass = $classLoader->loadClass($qualifiedSerialzierName);
         return $customSerializerClass;
     } catch (ClassNotFoundException $ex) {
         return null;
     }
 }
Example #3
0
 /**
  * 创建对象
  * @param $class
  */
 public static function create($package, $className)
 {
     ClassLoader::loadClass($package, $className);
     $instance = new $className();
     return $instance;
 }
Example #4
0
 /**
  * Loads and executes selected module
  * @param string $module Module name 
  */
 public static function loadModule($module)
 {
     parent::loadClass($module, 'module');
 }