PHP Class Search\Model\Filter\Base

Inheritance: use trait Cake\Core\InstanceConfigTrait
Afficher le fichier Open project: friendsofcake/search Class Usage Examples

Protected Properties

Свойство Type Description
$_args array Set the data to process on.
$_defaultConfig array Default configuration.
$_manager Search\Manager The parent Search Manager.
$_query Cake\ORM\Query Query object.

Méthodes publiques

Méthode Description
__construct ( string $name, Manager $manager, array $config = [] ) Constructor.
args ( array $value = null ) : array | null Get / Set the args.
field ( ) : string | array Get the database field name.
fields ( ) : array Get the database field name(s) as an array.
filterEmpty ( ) : boolean Check if empty value for name in query string should be filtered out.
manager ( ) : Manager Get the manager.
name ( ) : string Get the field name from HTTP GET query string.
present ( ) : boolean Check if the name is present in the arguments from HTTP GET.
process ( ) : void Modify the actual query object and append conditions based on the subclass business rules and type.
query ( Query $value = null ) : void | Query Get / Set the query object.
skip ( ) : boolean Checks whether this finder should be skipped.
valid ( ) : boolean Valid method.
validate ( array $value = null ) : array | null Get / Set the validation rules.
value ( ) : mixed Get the value of the "name" from HTTP GET arguments.

Method Details

__construct() public méthode

By default the name of the HTTP GET query argument will be assumed the field name in the database as well.
public __construct ( string $name, Manager $manager, array $config = [] )
$name string Name.
$manager Search\Manager Manager.
$config array Config.

args() public méthode

Get / Set the args.
public args ( array $value = null ) : array | null
$value array Value.
Résultat array | null

field() public méthode

Get the database field name.
public field ( ) : string | array
Résultat string | array

fields() public méthode

Get the database field name(s) as an array.
public fields ( ) : array
Résultat array

filterEmpty() public méthode

Check if empty value for name in query string should be filtered out.
public filterEmpty ( ) : boolean
Résultat boolean

manager() public méthode

Get the manager.
public manager ( ) : Manager
Résultat Search\Manager

name() public méthode

Get the field name from HTTP GET query string.
public name ( ) : string
Résultat string

present() public méthode

Check if the name is present in the arguments from HTTP GET.
public present ( ) : boolean
Résultat boolean

process() abstract public méthode

Modify the actual query object and append conditions based on the subclass business rules and type.
abstract public process ( ) : void
Résultat void

query() public méthode

Get / Set the query object.
public query ( Query $value = null ) : void | Query
$value Cake\ORM\Query Value.
Résultat void | Cake\ORM\Query

skip() public méthode

Checks whether this finder should be skipped.
public skip ( ) : boolean
Résultat boolean

valid() public méthode

Valid method.
public valid ( ) : boolean
Résultat boolean

validate() public méthode

Get / Set the validation rules.
public validate ( array $value = null ) : array | null
$value array Value.
Résultat array | null

value() public méthode

Get the value of the "name" from HTTP GET arguments.
public value ( ) : mixed
Résultat mixed

Property Details

$_args protected_oe property

Set the data to process on.
protected array $_args
Résultat array

$_defaultConfig protected_oe property

Default configuration.
protected array $_defaultConfig
Résultat array

$_manager protected_oe property

The parent Search Manager.
protected Manager,Search $_manager
Résultat Search\Manager

$_query protected_oe property

Query object.
protected Query,Cake\ORM $_query
Résultat Cake\ORM\Query