PHP Class DMS\Filter\Rules\Rule

Show file Open project: rdohms/dms-filter Class Usage Examples

Public Methods

Method Description
__construct ( mixed $options = null ) Initializes the filter rule with its options
getDefaultOption ( ) : string Returns the name of the default option
getFilter ( ) : string Retrieves the Filter class that is responsible for executing this filter It may also be a service name. By default it loads a class with the same name from the Filters namespace.
getRequiredOptions ( ) : array Returns the name of the required options

Private Methods

Method Description
parseOptions ( mixed $options ) : stdClass Parses provided options into their properties and returns results for the parsing process
parseOptionsArray ( array $options, stdClass $result ) Parses Options in the array format
parseSingleOption ( string $options, stdClass $result ) Parses single option received

Method Details

__construct() public method

Initializes the filter rule with its options
public __construct ( mixed $options = null )
$options mixed The options (as associative array) or the value for the default option (any other type)

getDefaultOption() public method

Override this method to define a default option.
See also: __construct()
public getDefaultOption ( ) : string
return string

getFilter() public method

Retrieves the Filter class that is responsible for executing this filter It may also be a service name. By default it loads a class with the same name from the Filters namespace.
public getFilter ( ) : string
return string

getRequiredOptions() public method

Override this method if you want to define required options.
See also: __construct()
public getRequiredOptions ( ) : array
return array