final public function getRepository()
    {
        $repositories = &Application::current()->getSharedArray("ModelRepositories");
        if (!isset($repositories[$this->modelName])) {
            $repositories[$this->modelName] = $this->createRepository();
        }

        return $repositories[$this->modelName];
    }
final public function getRepository()
    {
        $repositories = &Application::current()->getSharedArray("ModelRepositories");
        if (!isset($repositories[$this->modelName])) {
            $repositories[$this->modelName] = $this->createRepository();
        }

        return $repositories[$this->modelName];
    }
final public function getRepository ( ) { $ repositories = & Application :: current ( ) -> getSharedArray ( "ModelRepositories" ) ; if ( ! isset ( $ repositories [ $ this -> modelName ] ) ) { $ repositories [ $ this -> modelName ] = $ this -> createRepository ( ) ; } return $ repositories [ $ this -> modelName ] ; }
Returns the cached repository and generates one if it doesn't exist.

@see DataObject::createRepository()
@return \Rhubarb\Stem\Repositories\Repository
Returns the cached repository and generates one if it doesn t exist .