protected function _findClass($identifier)
    {
        $loader = $this->getService('anahita:loader');
        $classname = null;
        //Create the fallback path and make an exception for views
        $classpath = $identifier->path;
        $classtype = !empty($classpath) ? array_shift($classpath) : '';
        $paths = array();
        $paths[] = ucfirst($classtype).AnInflector::camelize(implode('_', $classpath));
        if ($classtype == 'view') {
            $paths[] = ucfirst($classtype);
        }

        $paths = array_unique($paths);

        $namespaces = array();
        $namespaces[] = 'Com'.ucfirst($identifier->package);
        $namespaces[] = 'Lib'.ucfirst($identifier->package);
        $namespaces[] = 'ComBase';
        $namespaces[] = 'LibBase';
        $namespaces[] = 'ComDefault';
        $namespaces[] = 'An';
        $namespaces = array_unique($namespaces);
        $classes = array();
        foreach ($namespaces as $namespace) {
            foreach ($paths as $path) {
                $names = array();
                $names[] = ucfirst($identifier->name);
                $names[] = empty($path) ? ucfirst($identifier->name).'Default' : 'Default';
                foreach ($names as $name) {
                    $class = $namespace.$path.$name;
                    $classes[] = $class;
                    if ($loader->findPath($class, $identifier->basepath) &&
                         $loader->loadClass($class, $identifier->basepath)) {
                        $classname = $class;
                        break 3;
                    }
                }
            }
        }

        return $classname;
    }
protected function _findClass($identifier)
    {
        $loader = $this->getService('anahita:loader');
        $classname = null;
        //Create the fallback path and make an exception for views
        $classpath = $identifier->path;
        $classtype = !empty($classpath) ? array_shift($classpath) : '';
        $paths = array();
        $paths[] = ucfirst($classtype).AnInflector::camelize(implode('_', $classpath));
        if ($classtype == 'view') {
            $paths[] = ucfirst($classtype);
        }

        $paths = array_unique($paths);

        $namespaces = array();
        $namespaces[] = 'Com'.ucfirst($identifier->package);
        $namespaces[] = 'Lib'.ucfirst($identifier->package);
        $namespaces[] = 'ComBase';
        $namespaces[] = 'LibBase';
        $namespaces[] = 'ComDefault';
        $namespaces[] = 'An';
        $namespaces = array_unique($namespaces);
        $classes = array();
        foreach ($namespaces as $namespace) {
            foreach ($paths as $path) {
                $names = array();
                $names[] = ucfirst($identifier->name);
                $names[] = empty($path) ? ucfirst($identifier->name).'Default' : 'Default';
                foreach ($names as $name) {
                    $class = $namespace.$path.$name;
                    $classes[] = $class;
                    if ($loader->findPath($class, $identifier->basepath) &&
                         $loader->loadClass($class, $identifier->basepath)) {
                        $classname = $class;
                        break 3;
                    }
                }
            }
        }

        return $classname;
    }
protected function _findClass ( $ identifier ) { $ loader = $ this -> getService ( 'anahita:loader' ) ; $ classname = null ; //Create the fallback path and make an exception for views $ classpath = $ identifier -> path ; $ classtype = ! empty ( $ classpath ) ? array_shift ( $ classpath ) : '' ; $ paths = array ( ) ; $ paths [ ] = ucfirst ( $ classtype ) . AnInflector :: camelize ( implode ( '_' , $ classpath ) ) ; if ( $ classtype == 'view' ) { $ paths [ ] = ucfirst ( $ classtype ) ; } $ paths = array_unique ( $ paths ) ; $ namespaces = array ( ) ; $ namespaces [ ] = 'Com' . ucfirst ( $ identifier -> package ) ; $ namespaces [ ] = 'Lib' . ucfirst ( $ identifier -> package ) ; $ namespaces [ ] = 'ComBase' ; $ namespaces [ ] = 'LibBase' ; $ namespaces [ ] = 'ComDefault' ; $ namespaces [ ] = 'An' ; $ namespaces = array_unique ( $ namespaces ) ; $ classes = array ( ) ; foreach ( $ namespaces as $ namespace ) { foreach ( $ paths as $ path ) { $ names = array ( ) ; $ names [ ] = ucfirst ( $ identifier -> name ) ; $ names [ ] = empty ( $ path ) ? ucfirst ( $ identifier -> name ) . 'Default' : 'Default' ; foreach ( $ names as $ name ) { $ class = $ namespace . $ path . $ name ; $ classes [ ] = $ class ; if ( $ loader -> findPath ( $ class , $ identifier -> basepath ) && $ loader -> loadClass ( $ class , $ identifier -> basepath ) ) { $ classname = $ class ; break 3 ; } } } } return $ classname ; }
Find a class.

@param AnServiceIdentifier $identifier

@return string
Find a class .