프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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. |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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. |
메소드 | 설명 | |
---|---|---|
__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 |
메소드 | 설명 | |
---|---|---|
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 | ||
리턴 | array | boolean |
protected getRelationType ( Illuminate\Database\Eloquent\Relations\Relation $relation ) : string | ||
$relation | Illuminate\Database\Eloquent\Relations\Relation | |
리턴 | string |
protected isRelation ( Illuminate\Database\Eloquent\Model $model, string $relationName ) : boolean | ||
$model | Illuminate\Database\Eloquent\Model | |
$relationName | string | |
리턴 | boolean |
protected parseConfig ( $configParam ) : void | ||
리턴 | void |
protected parseFields ( string $fieldsParam ) : void | ||
$fieldsParam | string | |
리턴 | void |
protected parseFilter ( array $filterParams ) : void | ||
$filterParams | array | |
리턴 | void |
public setConfigHandler ( mixed $config ) | ||
$config | mixed |
protected array $additionalFields | ||
리턴 | array |
protected array $additionalSorts | ||
리턴 | array |
public bool $envelope | ||
리턴 | boolean |
protected bool $isEloquentBuilder | ||
리턴 | boolean |
protected bool $isQueryBuilder | ||
리턴 | boolean |
protected Builder,Illuminate\Database\Query $originalQuery | ||
리턴 |