public getRepository ( ) : Puli\Repository\Api\EditableRepository | ||
Результат | Puli\Repository\Api\EditableRepository | The resource repository. |
public function getRepository()
{
if (!$this->started) {
throw new LogicException('Puli was not started');
}
if (!$this->context instanceof ProjectContext) {
return null;
}
if (!$this->repo) {
$this->repo = $this->getFactory()->createRepository();
}
return $this->repo;
}