/** * Returns file repository * * @return FileRepositoryInterface */ public function getFileRepository() { if (!$this->fileRepository) { $this->fileRepository = new FileRepository(); $this->fileRepository->attachTo($this); } return $this->fileRepository; }
private function deserializeIdentifiable(SerializedIdentifiable $serialized) { switch ($serialized->className) { case 'Xi\\Filelib\\File\\File': return $this->fileRepository->find($serialized->id); break; default: throw new LogicException('Unknown identifiable'); } }
/** * Finds and returns all files * * @return ArrayCollection */ public function findAll() { return $this->innerRepository->findAll(); }