fetchOne() public method

public fetchOne ( Kdyby\Persistence\Query $queryObject ) : object
$queryObject Kdyby\Persistence\Query
return object
 /**
  * @param QueryObject $listingsQuery
  * @return Listing|null
  * @throws ListingNotFoundException
  */
 public function fetchListing(QueryObject $listingsQuery)
 {
     $listing = $this->listingsRepository->fetchOne($listingsQuery);
     if ($listing === null) {
         throw new ListingNotFoundException();
     }
     return $listing;
 }
Example #2
0
 /**
  * @param AccessDefinition $query
  * @return AccessDefinition
  */
 public function fetchAccessDefinition(AccessDefinitionQuery $query)
 {
     return $this->accessDefinitionRepository->fetchOne($query);
 }
Example #3
0
 /**
  * @param CommentQuery $commentQuery
  * @return Comment|null
  */
 public function fetchComment(CommentQuery $commentQuery)
 {
     return $this->commentsRepository->fetchOne($commentQuery);
 }
Example #4
0
 /**
  * @param PageQuery $pageQuery
  * @return Page|null
  */
 public function fetchPage(PageQuery $pageQuery)
 {
     return $this->pageRepository->fetchOne($pageQuery);
 }
 /**
  * @param ReceivedMessagesQuery $query
  * @return ReceivedMessage|null
  */
 public function fetchMessageReference(ReceivedMessagesQuery $query)
 {
     return $this->messageReferenceRepository->fetchOne($query);
 }
Example #6
0
 /**
  * @param TagQuery $tagQuery
  * @return Tag|null
  */
 public function fetchTag(TagQuery $tagQuery)
 {
     return $this->tagRepository->fetchOne($tagQuery);
 }