Exemplo n.º 1
0
 public function set(RepositoryInterface $repo)
 {
     if (!isset($this->repositories[$repo->getName()])) {
         $this->repositories[strtolower($repo->getName())] = $repo;
     }
     return $this;
 }
 /**
  * @param $partId
  * @return \Modules\Parts\ReadModel\PartsThatWereManufactured
  */
 public function getReadModel($partId)
 {
     $partId = (string) $partId;
     $readModel = $this->repository->find($partId);
     Assertion::isInstanceOf($readModel, PartsThatWereManufactured::class);
     return $readModel;
 }
Exemplo n.º 3
0
 /**
  * Destroy a Satis repository.
  *
  * @param  \KevinDierkx\Muse\Repositories\Satis\RepositoryInterface  $model
  * @return \KevinDierkx\Muse\Repositories\Satis\RepositoryInterface
  */
 public function destroy(RepositoryInterface $model)
 {
     // TODO: Fire destroying event
     $this->repositories->forget($model->getId());
     $this->flush();
     // TODO: Fire destroyed event
     return $model;
 }
 /**
  * Find an entry with it's ID
  * @param $id int ID of the Entry
  * @return mixed
  */
 public function byId($questionId, $id)
 {
     return $this->model->byId($questionId, $id);
 }
Exemplo n.º 5
0
Arquivo: Rel.php Projeto: finef/entity
 public function remove(array &$entity)
 {
     $this->_repository->getRepositoryContainer()->getDb()->rel->delete(['rel_id_entity_master' => $entity['entity_id']]);
 }
Exemplo n.º 6
0
 /**
  * {@inheritdoc}
  */
 public function addRepository(RepositoryInterface $repository)
 {
     $this->repositories[$repository->getEntityTypeName()] = $repository;
 }