Property | Type | Description | |
---|---|---|---|
$builder | mixed | The builder Instance. | |
$envelope | boolean | If the response should be in an envelope or not | |
$meta | array | The parsed meta information | |
$mode | string | The mode for the response (count,default) | |
$multiple | boolean | If the parser works on multiple datasets | |
$originalBuilder | mixed | The original builder Instance. |
Property | Type | Description | |
---|---|---|---|
$additionalFields | array | All fields that belong to a relation | |
$additionalSorts | array | All sorts that belong to a relation | |
$functionalParams | All functional params | ||
$functions | array | Predefined functions | |
$isEloquentBuilder | boolean | If builder is an eloquent builder or not | |
$isQueryBuilder | boolean | If builder is an query builder or not | |
$originalQuery | The original query builder instance. | ||
$params | array | The http query params. | |
$query | The base query builder instance. |
Method | Description | |
---|---|---|
__construct ( mixed $builder, array $params ) | Instantiate the Parser class | |
parse ( mixed $options, boolean $multiple = false ) : void | Parse the query parameters with the given options. | |
setConfigHandler ( mixed $config ) | Set the config object |
Method | Description | |
---|---|---|
getFilterParams ( ) : array | boolean | Get the relevant filter parameters | |
getParam ( string $param ) : string | boolean | Get a parameter | |
getRelationType ( Illuminate\Database\Eloquent\Relations\Relation $relation ) : string | Determine the type of the Eloquent relation | |
isRelation ( Illuminate\Database\Eloquent\Model $model, string $relationName ) : boolean | Check if there exists a method marked with the "@Relation" annotation on the given model. | |
parseConfig ( $configParam ) : void | Parse the meta parameter and prepare an array of meta provider objects. | |
parseFields ( string $fieldsParam ) : void | Parse the fields parameter and return an array of fields | |
parseFilter ( array $filterParams ) : void | Parse the remaining filter params | |
parseFullTextSearch ( string $qParam, array $fullTextSearchColumns ) : void | Parse the fulltext search parameter q | |
parseSort ( string $sortParam ) : void | Parse the sort param and determine whether the sorting is ascending or descending. | |
parseWith ( string $withParam ) : void | Parse the with parameter |
public __construct ( mixed $builder, array $params ) | ||
$builder | mixed | |
$params | array |
protected getFilterParams ( ) : array | boolean | ||
return | array | boolean |
protected getRelationType ( Illuminate\Database\Eloquent\Relations\Relation $relation ) : string | ||
$relation | Illuminate\Database\Eloquent\Relations\Relation | |
return | string |
protected isRelation ( Illuminate\Database\Eloquent\Model $model, string $relationName ) : boolean | ||
$model | Illuminate\Database\Eloquent\Model | |
$relationName | string | |
return | boolean |
protected parseConfig ( $configParam ) : void | ||
return | void |
protected parseFields ( string $fieldsParam ) : void | ||
$fieldsParam | string | |
return | void |
protected parseFilter ( array $filterParams ) : void | ||
$filterParams | array | |
return | void |
public setConfigHandler ( mixed $config ) | ||
$config | mixed |
protected array $additionalFields | ||
return | array |
protected array $additionalSorts | ||
return | array |
public bool $envelope | ||
return | boolean |
protected bool $isEloquentBuilder | ||
return | boolean |
protected bool $isQueryBuilder | ||
return | boolean |
public string $mode | ||
return | string |
public bool $multiple | ||
return | boolean |
public mixed $originalBuilder | ||
return | mixed |
protected Builder,Illuminate\Database\Query $originalQuery | ||
return |