PHP Класс 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)
Наследование: extends QueryExecuter
Показать файл Открыть проект

Открытые методы

Метод Описание
executeQuery ( $request_type )

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
_buildNestedResource ( ) : Illuminate\Database\Eloquent\Model _buildNestedResource handles nested resource by formatting it

Описание методов

executeQuery() публичный Метод

public executeQuery ( $request_type )

get() защищенный Метод

runs a query on the get request results
protected get ( integer $per_page ) : array
$per_page integer - pagination setting
Результат array formatted results

getCollection() защищенный Метод

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
Результат Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Builder

post() защищенный Метод

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