PHP Class Indatus\Ranger\ApiDatabase\QueryExecution\CollectionQuery

This class executes the queries on the builder collection returned by the class that Implements the ApiQueryAssemblerInterface. The collection being returned will be one of the Laravel database eloquent classes (QueryBuilder or Model)
Inheritance: extends QueryExecuter
Datei anzeigen Open project: indatus/ranger

Public Methods

Method Description
executeQuery ( $request_type )

Protected Methods

Method Description
get ( integer $per_page ) : array runs a query on the get request results
getCollection ( ) : Illuminate\Database\Eloquent\Model getCollection - first this method loops through an array of objects that are sub-classes of the Indatus\Ranger\ApiDatabase\QueryBuilding\ApiQueryBuilder and runs the buildQueryFromParameters() method on each of them.
post ( ) In collection because I want to add an instance to a collection This could go to the InstanceQuery class instead

Private Methods

Method Description
_buildNestedResource ( ) : Illuminate\Database\Eloquent\Model _buildNestedResource handles nested resource by formatting it

Method Details

executeQuery() public method

public executeQuery ( $request_type )

get() protected method

runs a query on the get request results
protected get ( integer $per_page ) : array
$per_page integer - pagination setting
return array formatted results

getCollection() protected method

Then if the collection is called from a nested resource, it will do some additional formatting. Else, it will just return the builder.
protected getCollection ( ) : Illuminate\Database\Eloquent\Model
return Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Builder

post() protected method

In collection because I want to add an instance to a collection This could go to the InstanceQuery class instead
protected post ( )