public static function getRepository($identifier, $config = array())
    {
        if (strpos($identifier, 'repos:') === 0) {
            $repository = AnService::get($identifier);
        } else {
            $strIdentifier = (string) $identifier;

            if (!AnService::has($identifier)) {
                $identifier = self::getEntityIdentifier($identifier);
            }

            if (!AnService::has($identifier)) {
                AnService::set($strIdentifier, AnService::get($identifier, $config));
            }

            $repository = AnService::get($identifier)->getRepository();
        }

        return $repository;
    }
public static function getRepository($identifier, $config = array())
    {
        if (strpos($identifier, 'repos:') === 0) {
            $repository = AnService::get($identifier);
        } else {
            $strIdentifier = (string) $identifier;

            if (!AnService::has($identifier)) {
                $identifier = self::getEntityIdentifier($identifier);
            }

            if (!AnService::has($identifier)) {
                AnService::set($strIdentifier, AnService::get($identifier, $config));
            }

            $repository = AnService::get($identifier)->getRepository();
        }

        return $repository;
    }
public static function getRepository ( $ identifier , $ config = array ( ) ) { if ( strpos ( $ identifier , 'repos:' ) === 0 ) { $ repository = AnService :: get ( $ identifier ) ; } else { $ strIdentifier = ( string ) $ identifier ; if ( ! AnService :: has ( $ identifier ) ) { $ identifier = self :: getEntityIdentifier ( $ identifier ) ; } if ( ! AnService :: has ( $ identifier ) ) { AnService :: set ( $ strIdentifier , AnService :: get ( $ identifier , $ config ) ) ; } $ repository = AnService :: get ( $ identifier ) -> getRepository ( ) ; } return $ repository ; }
Helper mehtod to return a repository for an entity.

@param string $identifier Entity Identifier
@param array  $config     Configuration

@return AnDomainRepositoryAbstract
Helper mehtod to return a repository for an entity .