Property | Type | Description | |
---|---|---|---|
$contentTypes | array | ||
$directiveHandlers | callable[] | ||
$directives | array | ||
$em | |||
$handlers | callable[] | ||
$identifier | string | ||
$operation | string | ||
$operations | array | ||
$params | array | ||
$query | string | ||
$services | Bolt\Storage\Query\QueryInterface[] |
Method | Description | |
---|---|---|
__construct ( |
Constructor. | |
addDirectiveHandler ( string $key, callable $callback = null ) | Adds a handler for the named directive. | |
addHandler ( string $operation, callable $callback ) | Adds a handler AND operation for the named operation. | |
addOperation ( string $operation ) | Adds a new operation to the list supported. | |
addService ( string $operation, Bolt\Storage\Query\QueryInterface $service ) | Adds a service for the named operation. | |
fetch ( ) : |
Runs the query and fetches the results. | |
getContentTypes ( ) : array | Returns the parsed content types. | |
getDirective ( string $key ) : string | Returns a directive from the parsed list. | |
getDirectiveHandler ( string $check ) : callable | Returns the handler for the named directive. | |
getEntityManager ( ) : |
Gets the object EntityManager | |
getHandler ( string $operation ) : callable | Returns a handler for the named operation. | |
getIdentifier ( ) : string | Returns the parsed identifier. | |
getOperation ( ) : string | Returns the parsed operation. | |
getOperations ( ) : array | Getter to return the currently registered operations. | |
getParameter ( string $param ) : array | Returns a single named parameter. | |
getParameters ( ) : array | Returns the current parameters. | |
getService ( string $operation ) : Bolt\Storage\Query\QueryInterface | Returns a service for the named operation. | |
hasDirectiveHandler ( string $check ) : boolean | Returns boolean for existence of handler. | |
parse ( ) | Parse a query. | |
removeOperation ( string $operation ) | Removes an operation from the list supported. | |
runDirectives ( Bolt\Storage\Query\QueryInterface $query, array $skipDirective = [] ) | This runs the callbacks attached to each directive command. | |
setDirective ( string $key, mixed $value ) | Sets a directive for the named key. | |
setParameter ( string $param, mixed $value ) | Sets a single input parameter. | |
setParameters ( array $params ) | Sets the input parameters to handle. | |
setQuery ( string $query ) | Sets the input query. |
Method | Description | |
---|---|---|
parseContent ( ) | Parses the content area of the querystring. | |
parseDirectives ( ) | Directives are all of the other parameters supported by Bolt that do not relate to an actual filter query. Some examples include 'printquery', 'limit', 'order' or 'returnsingle'. | |
parseOperation ( ) | Internal method that takes the 'query' part of the input and parses it into one of the various operations supported. | |
setupDefaults ( ) | Internal method to initialise the default handlers. |
public __construct ( |
||
$em | ||
$queryHandler | Bolt\Storage\Query\QueryInterface |
public addDirectiveHandler ( string $key, callable $callback = null ) | ||
$key | string | |
$callback | callable |
public addHandler ( string $operation, callable $callback ) | ||
$operation | string | |
$callback | callable |
public addOperation ( string $operation ) | ||
$operation | string | name of operation to parse for |
public addService ( string $operation, Bolt\Storage\Query\QueryInterface $service ) | ||
$operation | string | |
$service | Bolt\Storage\Query\QueryInterface |
public fetch ( ) : |
||
return |
public getContentTypes ( ) : array | ||
return | array |
public getDirective ( string $key ) : string | ||
$key | string | |
return | string |
public getDirectiveHandler ( string $check ) : callable | ||
$check | string | |
return | callable |
public getEntityManager ( ) : |
||
return |
public getHandler ( string $operation ) : callable | ||
$operation | string | |
return | callable |
public getIdentifier ( ) : string | ||
return | string |
public getOperation ( ) : string | ||
return | string |
public getOperations ( ) : array | ||
return | array |
public getParameter ( string $param ) : array | ||
$param | string | |
return | array |
public getParameters ( ) : array | ||
return | array |
public getService ( string $operation ) : Bolt\Storage\Query\QueryInterface | ||
$operation | string | |
return | Bolt\Storage\Query\QueryInterface |
public hasDirectiveHandler ( string $check ) : boolean | ||
$check | string | |
return | boolean |
protected parseContent ( ) |
protected parseDirectives ( ) |
protected parseOperation ( ) |
public removeOperation ( string $operation ) | ||
$operation | string | name of operation to remove |
public runDirectives ( Bolt\Storage\Query\QueryInterface $query, array $skipDirective = [] ) | ||
$query | Bolt\Storage\Query\QueryInterface | |
$skipDirective | array |
public setDirective ( string $key, mixed $value ) | ||
$key | string | |
$value | mixed |
public setParameter ( string $param, mixed $value ) | ||
$param | string | |
$value | mixed |
public setParameters ( array $params ) | ||
$params | array |
protected setupDefaults ( ) |