protected function getClassXType($root, $class, $path)
    {
        if ($type = $this->getFromCache($class, $path)) {
            return $type;
        }

        $root = is_object($root) ? $root : new $root;

        // If the class is in cache but not the specific path
        if (isset($this->classCache[$class])) {
            return null;
        }

        $classType = $root instanceof SelfExplanatory ?
                        $this->typeFactory->toType($root) :
                        $this->getFromExtension($class);

        if ($classType) {
            $this->putAllIntoCache($class, $classType);
            return $path ? $this->getClassXType($root, $class, $path) : $classType;
        }

        return null;
    }
protected function getClassXType($root, $class, $path)
    {
        if ($type = $this->getFromCache($class, $path)) {
            return $type;
        }

        $root = is_object($root) ? $root : new $root;

        // If the class is in cache but not the specific path
        if (isset($this->classCache[$class])) {
            return null;
        }

        $classType = $root instanceof SelfExplanatory ?
                        $this->typeFactory->toType($root) :
                        $this->getFromExtension($class);

        if ($classType) {
            $this->putAllIntoCache($class, $classType);
            return $path ? $this->getClassXType($root, $class, $path) : $classType;
        }

        return null;
    }
protected function getClassXType ( $ root , $ class , $ path ) { if ( $ type = $ this -> getFromCache ( $ class , $ path ) ) { return $ type ; } $ root = is_object ( $ root ) ? $ root : new $ root ; // If the class is in cache but not the specific path if ( isset ( $ this -> classCache [ $ class ] ) ) { return null ; } $ classType = $ root instanceof SelfExplanatory ? $ this -> typeFactory -> toType ( $ root ) : $ this -> getFromExtension ( $ class ) ; if ( $ classType ) { $ this -> putAllIntoCache ( $ class , $ classType ) ; return $ path ? $ this -> getClassXType ( $ root , $ class , $ path ) : $ classType ; } return null ; }
Try to load a xtype of an object

@param mixed  $root
@param string $class
@param string $path

@return XType|null
Try to load a xtype of an object