code/object/locator/component.php
public function getClassTemplates(ObjectIdentifier $identifier)
    {
        $templates = array();

        //Identifier
        $component = $this->getObject('object.bootstrapper')
            ->getComponentIdentifier($identifier->package, $identifier->domain);

        //Fallback
        if($namespaces = $this->getIdentifierNamespaces($component))
        {
            foreach($namespaces as $namespace)
            {
                //Handle class prefix vs class namespace
                if(strpos($namespace, '\\')) {
                    $namespace .= '\\';
                }

                $templates[] = $namespace.'<Class>';
                $templates[] = $namespace.'<Package><Path><File>';
            }
        }

        $templates = array_merge($templates, parent::getClassTemplates($identifier));

        return $templates;
    }
public function getClassTemplates(ObjectIdentifier $identifier)
    {
        $templates = array();

        //Identifier
        $component = $this->getObject('object.bootstrapper')
            ->getComponentIdentifier($identifier->package, $identifier->domain);

        //Fallback
        if($namespaces = $this->getIdentifierNamespaces($component))
        {
            foreach($namespaces as $namespace)
            {
                //Handle class prefix vs class namespace
                if(strpos($namespace, '\\')) {
                    $namespace .= '\\';
                }

                $templates[] = $namespace.'<Class>';
                $templates[] = $namespace.'<Package><Path><File>';
            }
        }

        $templates = array_merge($templates, parent::getClassTemplates($identifier));

        return $templates;
    }
public function getClassTemplates ( ObjectIdentifier $ identifier ) { $ templates = array ( ) ; //Identifier $ component = $ this -> getObject ( 'object.bootstrapper' ) -> getComponentIdentifier ( $ identifier -> package , $ identifier -> domain ) ; //Fallback if ( $ namespaces = $ this -> getIdentifierNamespaces ( $ component ) ) { foreach ( $ namespaces as $ namespace ) { //Handle class prefix vs class namespace if ( strpos ( $ namespace , '\\' ) ) { $ namespace .= '\\' ; } $ templates [ ] = $ namespace . '<Class>' ; $ templates [ ] = $ namespace . '<Package><Path><File>' ; } } $ templates = array_merge ( $ templates , parent :: getClassTemplates ( $ identifier ) ) ; return $ templates ; }
Get the list of class templates for an identifier

@param ObjectIdentifier $identifier The object identifier
@return array The class templates for the identifier
Get the list of class templates for an identifier