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
Afficher le fichier Open project: indatus/ranger

Méthodes publiques

Méthode Description
executeQuery ( $request_type )

Méthodes protégées

Méthode 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

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

Method Details

executeQuery() public méthode

public executeQuery ( $request_type )

get() protected méthode

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

getCollection() protected méthode

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
Résultat Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Builder

post() protected méthode

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