src/ReflectionEngine.php
public static function parseClass($fullClassName)
    {
        $classFileName  = self::locateClassFile($fullClassName);
        $namespaceParts = explode('\\', $fullClassName);
        $className      = array_pop($namespaceParts);
        $namespaceName  = join('\\', $namespaceParts);

        // we have a namespace node somewhere
        $namespace      = self::parseFileNamespace($classFileName, $namespaceName);
        $namespaceNodes = $namespace->stmts;

        foreach ($namespaceNodes as $namespaceLevelNode) {
            if ($namespaceLevelNode instanceof ClassLike && $namespaceLevelNode->name == $className) {
                $namespaceLevelNode->setAttribute('fileName', $classFileName);

                return $namespaceLevelNode;
            }
        }

        throw new \InvalidArgumentException("Class $fullClassName was not found in the $classFileName");
    }
public static function parseClass($fullClassName)
    {
        $classFileName  = self::locateClassFile($fullClassName);
        $namespaceParts = explode('\\', $fullClassName);
        $className      = array_pop($namespaceParts);
        $namespaceName  = join('\\', $namespaceParts);

        // we have a namespace node somewhere
        $namespace      = self::parseFileNamespace($classFileName, $namespaceName);
        $namespaceNodes = $namespace->stmts;

        foreach ($namespaceNodes as $namespaceLevelNode) {
            if ($namespaceLevelNode instanceof ClassLike && $namespaceLevelNode->name == $className) {
                $namespaceLevelNode->setAttribute('fileName', $classFileName);

                return $namespaceLevelNode;
            }
        }

        throw new \InvalidArgumentException("Class $fullClassName was not found in the $classFileName");
    }
public static function parseClass ( $ fullClassName ) { $ classFileName = self :: locateClassFile ( $ fullClassName ) ; $ namespaceParts = explode ( '\\' , $ fullClassName ) ; $ className = array_pop ( $ namespaceParts ) ; $ namespaceName = join ( '\\' , $ namespaceParts ) ; // we have a namespace node somewhere $ namespace = self :: parseFileNamespace ( $ classFileName , $ namespaceName ) ; $ namespaceNodes = $ namespace -> stmts ; foreach ( $ namespaceNodes as $ namespaceLevelNode ) { if ( $ namespaceLevelNode instanceof ClassLike && $ namespaceLevelNode -> name == $ className ) { $ namespaceLevelNode -> setAttribute ( 'fileName' , $ classFileName ) ; return $ namespaceLevelNode ; } } throw new \ InvalidArgumentException ( "Class $fullClassName was not found in the $classFileName" ) ; }
Tries to parse a class by name using LocatorInterface

@param string $fullClassName Class name to load

@return ClassLike
Tries to parse a class by name using LocatorInterface