Skip to content

Instantly share code, notes, and snippets.

@takethefake
Last active September 17, 2015 14:28
Show Gist options
  • Save takethefake/98b8d656adf1a1cc5aaf to your computer and use it in GitHub Desktop.
Save takethefake/98b8d656adf1a1cc5aaf to your computer and use it in GitHub Desktop.
$response = $this->triggerDoctrineEvent(
DoctrineResourceEvent::EVENT_FETCH_ALL_PRE,
$this->getEntityClass(),
$data
);
if ($response->last() instanceof ApiProblem) {
return $response->last();
}
$adapter = $queryProvider->getPaginatedQuery($queryBuilder);
$reflection = new ReflectionClass($this->getCollectionClass());
$collection = $reflection->newInstance($adapter);
$results = $this->triggerDoctrineEvent(
DoctrineResourceEvent::EVENT_FETCH_ALL_POST,
$this->getEntityClass(),
$data
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment