src/Zend/Loader/Autoloader/Resource.php
public function addResourceType($type, $path, $namespace = null)
    {
        $type = strtolower($type);
        if (!isset($this->_resourceTypes[$type])) {
            if (null === $namespace) {

                throw new Zend_Loader_Exception('Initial definition of a resource type must include a namespace');
            }
            $namespaceTopLevel = $this->getNamespace();
            $namespace = ucfirst(trim($namespace, '_'));
            $this->_resourceTypes[$type] = array(
                'namespace' => empty($namespaceTopLevel) ? $namespace : $namespaceTopLevel . '_' . $namespace,
            );
        }
        if (!is_string($path)) {

            throw new Zend_Loader_Exception('Invalid path specification provided; must be string');
        }
        $this->_resourceTypes[$type]['path'] = $this->getBasePath() . '/' . rtrim($path, '\/');

        $component = $this->_resourceTypes[$type]['namespace'];
        $this->_components[$component] = $this->_resourceTypes[$type]['path'];
        return $this;
    }
public function addResourceType($type, $path, $namespace = null)
    {
        $type = strtolower($type);
        if (!isset($this->_resourceTypes[$type])) {
            if (null === $namespace) {

                throw new Zend_Loader_Exception('Initial definition of a resource type must include a namespace');
            }
            $namespaceTopLevel = $this->getNamespace();
            $namespace = ucfirst(trim($namespace, '_'));
            $this->_resourceTypes[$type] = array(
                'namespace' => empty($namespaceTopLevel) ? $namespace : $namespaceTopLevel . '_' . $namespace,
            );
        }
        if (!is_string($path)) {

            throw new Zend_Loader_Exception('Invalid path specification provided; must be string');
        }
        $this->_resourceTypes[$type]['path'] = $this->getBasePath() . '/' . rtrim($path, '\/');

        $component = $this->_resourceTypes[$type]['namespace'];
        $this->_components[$component] = $this->_resourceTypes[$type]['path'];
        return $this;
    }
public function addResourceType ( $ type , $ path , $ namespace = null ) { $ type = strtolower ( $ type ) ; if ( ! isset ( $ this -> _resourceTypes [ $ type ] ) ) { if ( null === $ namespace ) { throw new Zend_Loader_Exception ( 'Initial definition of a resource type must include a namespace' ) ; } $ namespaceTopLevel = $ this -> getNamespace ( ) ; $ namespace = ucfirst ( trim ( $ namespace , '_' ) ) ; $ this -> _resourceTypes [ $ type ] = array ( 'namespace' => empty ( $ namespaceTopLevel ) ? $ namespace : $ namespaceTopLevel . '_' . $ namespace , ) ; } if ( ! is_string ( $ path ) ) { throw new Zend_Loader_Exception ( 'Invalid path specification provided; must be string' ) ; } $ this -> _resourceTypes [ $ type ] [ 'path' ] = $ this -> getBasePath ( ) . '/' . rtrim ( $ path , '\/' ) ; $ component = $ this -> _resourceTypes [ $ type ] [ 'namespace' ] ; $ this -> _components [ $ component ] = $ this -> _resourceTypes [ $ type ] [ 'path' ] ; return $ this ; }
Add resource type

@param  string $type identifier for the resource type being loaded
@param  string $path path relative to resource base path containing the resource types
@param  null|string $namespace sub-component namespace to append to base namespace that qualifies this resource type
@return Zend_Loader_Autoloader_Resource
Add resource type