PHP Class MetaModels\Filter\Setting\CustomSql

The generated rule will only return ids that are returned from this query.
Inheritance: extends Simple
Mostra file Open project: metamodels/core Class Usage Examples

Public Methods

Method Description
convertParameter ( array $arrMatch ) : string Convert a parameter in the query string.
getParameters ( ) {@inheritDoc}
parseAndAddSecureInsertTagAsParameter ( string $arrMatch ) : string Replace all insert tags in the query string.
prepareRules ( MetaModels\Filter\IFilter $objFilter, $arrFilterUrl )

Private Methods

Method Description
addParameter ( string $parameter ) : void Add a parameter to the list.
addParameters ( array $parameters ) : void Add parameters to the list.
compile ( ) : void Compile the query and the parameters.
convertParameterAggregate ( string $var, array $arguments ) : string Convert a parameter using an aggregate function.
getFilterRule ( ) : MetaModels\Filter\Rules\SimpleQuery Retrieve the simple query.
getValueFromServiceContainer ( string $valueName, array $arguments ) : mixed Retrieve the value with the given name from the service container.
getValueFromSource ( string $source, string $valueName, array $arguments ) : mixed Retrieve the value with the given name from the source with the given name.
parseInsertTags ( ) : void Replace all insert tags in the query string.
parseInsertTagsInternal ( string $queryString ) : string Replace all insert tags in the query string.
parseRequestVars ( ) : void Parse a request var insert tag within the SQL.
parseSecureInsertTags ( ) : void Replace all secure insert tags.
parseTable ( ) : void Replace the table name in the query string.

Method Details

convertParameter() public method

Convert a parameter in the query string.
public convertParameter ( array $arrMatch ) : string
$arrMatch array The match from the preg_replace_all call in parseRequestVars().
return string

getParameters() public method

{@inheritDoc}
public getParameters ( )

parseAndAddSecureInsertTagAsParameter() public method

Replace all insert tags in the query string.
public parseAndAddSecureInsertTagAsParameter ( string $arrMatch ) : string
$arrMatch string The match from the preg_replace call.
return string

prepareRules() public method

public prepareRules ( MetaModels\Filter\IFilter $objFilter, $arrFilterUrl )
$objFilter MetaModels\Filter\IFilter