コード例 #1
0
 /**
  * @param Query|UserQuery $query
  *
  * @return Resource
  */
 public function handle(Query $query)
 {
     $data = $this->repository->findUser($query->getId());
     return new Resource($data, $this->serializer);
 }
コード例 #2
0
 /**
  * @param Query|PictureQuery $query
  *
  * @return Resource
  */
 public function handle(Query $query)
 {
     $data = $this->repository->findOneUserPicture($query->getUserId(), $query->getFormat());
     return new Resource($data, $this->serializer);
 }
コード例 #3
0
 /**
  * @param Query $query
  *
  * @return Collection
  */
 public function handle(Query $query)
 {
     $data = $this->repository->findFriends($query->getUserId(), $query->getPageNumber(), $query->getPageSize());
     return new Collection($data, $this->serializer);
 }
コード例 #4
0
 /**
  * @param Query $query
  *
  * @return LegacyCollection
  */
 public function handle(Query $query)
 {
     $data = $this->repository->findUserPictures($query->getUserId());
     return new Collection($data, $this->serializer);
 }