Esempio n. 1
0
 /**
  * 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');
     }
 }
Esempio n. 3
0
 /**
  * Finds and returns all files
  *
  * @return ArrayCollection
  */
 public function findAll()
 {
     return $this->innerRepository->findAll();
 }