fetch() public method

If the extractCollections array contains a collection for this resource expand that collection instead of returning a link to the collection
public fetch ( mixed $id ) : ZF\ApiProblem\ApiProblem | mixed
$id mixed
return ZF\ApiProblem\ApiProblem | mixed
Example #1
0
 /**
  * Fetch a user2note
  *
  * @param int $noteId
  * @throws \InvalidArgumentException
  * @return ApiProblem|mixed
  */
 public function fetch($noteId)
 {
     /** @var Service\User $userService */
     $userService = $this->getServiceManager()->get('user-service');
     $user = $userService->getUserByMail($this->getIdentity()->getName());
     $this->setEntityIdentifierName('userId.noteId');
     return parent::fetch($user->getId() . '.' . $noteId);
 }