public function getRepository($typeName)
    {
        if (isset($this->repositories[$typeName])) {
            return $this->repositories[$typeName];
        }

        if (!isset($this->types[$typeName])) {
            throw new RuntimeException(sprintf('No search finder configured for %s', $typeName));
        }

        $repository = $this->createRepository($typeName);
        $this->repositories[$typeName] = $repository;

        return $repository;
    }
public function getRepository($typeName)
    {
        if (isset($this->repositories[$typeName])) {
            return $this->repositories[$typeName];
        }

        if (!isset($this->types[$typeName])) {
            throw new RuntimeException(sprintf('No search finder configured for %s', $typeName));
        }

        $repository = $this->createRepository($typeName);
        $this->repositories[$typeName] = $repository;

        return $repository;
    }
public function getRepository ( $ typeName ) { if ( isset ( $ this -> repositories [ $ typeName ] ) ) { return $ this -> repositories [ $ typeName ] ; } if ( ! isset ( $ this -> types [ $ typeName ] ) ) { throw new RuntimeException ( sprintf ( 'No search finder configured for %s' , $ typeName ) ) ; } $ repository = $ this -> createRepository ( $ typeName ) ; $ this -> repositories [ $ typeName ] = $ repository ; return $ repository ; }
Return repository for entity.

Returns custom repository if one specified otherwise
returns a basic repository.

@param string $typeName

@return Repository
Return repository for entity .