调用类并返回一个结果对象
@param string $className 要被调用的类的全限定名称
@return type
778925
public function invoke($className) {
        $classObject = new $className();
        $classRefObj = new ReflectionClass($className);

        //加载类元数据
        $classMetadata = $this->classMetadataLoader->load($className);

        //注入属性
        $propertyMetadata = $classMetadata['propertyMetadata'];
        $this->propertyInjector->inject($classObject, $classRefObj, $propertyMetadata);

        //如果有init方法，先执行init方法
        if ($classRefObj->hasMethod('init')) {
            $classObject->init();
        }

        //执行类入口方法并返回
        $method = self::ENTRY_METHOD;
        $return = $classObject->$method();
        return $return;
    }
492209
public static function get_by_object_classname($classname) {
		$db = Database::Get();
		$ids = $db->getCol('SELECT id FROM object_text WHERE classname=?', [ $classname ]);
		$object_texts = [];
		foreach ($ids as $id) {
			$object_texts[] = self::get_by_id($id);
		}
		return $object_texts;
	}
1332140
function &findClass($className)
    {
        $return = NULL;
        if (isset($this->_classes[$className])) {
            $return =& $this->_classes[$className];
        }

        return $return;
    }
1076873
public function getByClassname(string $classname)
    {
        foreach ($this->container as $value) {
            if (is_object($value) && $value instanceof $classname) {
                return $value;
            }
        }

        return null;
    }
33438
protected function checkClassForCompability( $className ) {
    $result = $className;
    if( isset( DeferredExceptionsGlobal::$defExcClasses [$className])){
       if( ! DeferredExceptionsGlobal::$defExcClasses [$className] ){
         $result = null;
       }
    } else {
      if( ! class_exists( $className ) || ! is_subclass_of( $className, 'Exception')) {
        DeferredExceptionsGlobal::$defExcClasses [$className] = false;
        $result = null;
      } else {
        DeferredExceptionsGlobal::$defExcClasses [$className] = true;
      }
    }
    return $result;
  }
872219
public function asSharedInstanceOf($className)
        {
            $endPoint =& $this->_getEndPoint();
            $endPoint['lookupType'] = self::TYPE_SHARED;
            $endPoint['className'] = $className;

            return $this;
        }
1313858
public function getIdByClassName($className)
    {
        $classId = $this->getClassIdFromShopMap($className);

        if (empty($classId)) {
            $classId = $this->getClassIdFromModuleMap($className);
        }
        return $classId;
    }
315579
public function removeClass($classname)
    {
        $classArr = array_diff($this->getClassArray(), [$classname]);
        return $this->setClassArray($classArr);
    }
701402
public static function getClassProfile($classname) {
		if (!array_key_exists($classname, self::$profiles))
			self::$profiles[$classname] = new ClassProfile($classname);
		
		return self::$profiles[$classname];
	}
934098
public function createClassConstantReference(string $className): ClassConstFetch
    {
        $nameNode = new FullyQualified($className);

        return $this->builderFactory->classConstFetch($nameNode, 'class');
    }
369048
protected function getInstance(string $className)
    {
        $config = [
            'class'   => $className,
            'name'    => $this->name,
            'form'    => $this->form,
            'model'   => $this->model,
            'label'   => $this->label,
            'data'    => $this->data,
            'options' => $this->options,
            'preset'  => $this->preset,
        ];

        if ($this->language !== null) {
            $config['language'] = $this->language;
        }

        return \Yii::createObject($config);
    }
282235
public function create(string $className, string $typeName): Type
    {
        $description = $this->getDescription($className);

        $fieldsGetter = function () use ($className): array {
            $factory = new InputFieldsConfigurationFactory($this->types, $this->entityManager);
            $configuration = $factory->create($className);

            return $configuration;
        };

        return new InputObjectType([
            'name' => $typeName,
            'description' => $description,
            'fields' => $fieldsGetter,
        ]);
    }
202142
public static function factory($className)
    {
        if (!$className || !is_string($className)) {
            exit('类名参数不正确');
        }

        $className = __NAMESPACE__ . '\\API\\' . $className . 'Api';

        if (!array_key_exists($className, self::$selfInstanceMap)) {
            $api = new $className();
            if (!$api instanceof BaseApi) {
                exit($className . ' 必须继承 BaseApi');
            }
            self::$selfInstanceMap[$className] = $api;
        }
        self::$instantiation = true;
        Api::$instantiation  = false;

        return self::$selfInstanceMap[$className];
    }
369549
public function findClassName($className)
    {
        if (!empty($this->lookupCache->classes[$className])) {
            return $this->lookupCache->classes[$className];
        }

        if (class_exists($className)) return $className;
        $startsWithSlash = ($className[0] == '\\');

        foreach ($this->searchOrder as $namespace)
        {
            $testClass = '\\' . $namespace;
            if (!$startsWithSlash) {
                $testClass .= '\\';
            }

            $testClass .= $className;

            if (class_exists($testClass)) {
                $this->lookupCache->classes[$className] = $testClass;
                return $testClass;
            }
        }

        return null;
    }
973140
public function loadClass($className)
    {
        if (self::typeExists($className)) {
            return true;
        }

        if ( ! $this->canLoadClass($className)) {
            return false;
        }

        require($this->includePath !== null ? $this->includePath . DIRECTORY_SEPARATOR : '')
               . str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className)
               . $this->fileExtension;

        return self::typeExists($className);
    }
1187599
public static function instance($className = __CLASS__)
    {
        if (!isset(self::$instances[$className])) {
            self::$instances[$className] = new $className;
        }

        return self::$instances[$className];
    }
1137280
public function getClassAliasName($className)
    {
        /*
         * Sanitize input: class names in namespaces should not, but may include a leading backslash
         */
        $className = ltrim($className, '\\');
        $classAlias = array_search($className, $this->classMap);

        if ($classAlias === false) {
            $classAlias = null;
        }

        return $classAlias;
    }