protected function getCollection()
{
//Using polymorphism to loop through the apiQueryBuilder objects
//ie) Joins, LeftJoins, etc. and call buildQueryFromParameters()
//on each of those objects
foreach ($this->apiQueryBuilders as $queryBuilder) {
$this->builder = $queryBuilder->buildQueryFromParameters($this->builder, $this->requestContainer->getInput());
}
//think about moving nested Resource in the apiQueryBuilders array of objects
if (!$this->isNestedResource()) {
return $this->builder;
}
return $this->_buildNestedResource();
}