PHP Class MatchObjectFilter, silvershop-core
Combining fields defines a way to uniquely identify an object.
Useful for finding if a dataobject with given field values exists.
Protects against SQL injection, and searching on unauthroised fields.
Ignores fields that don't exist on the object.
Adds IS NULL, or = 0 for values that are not passed.
Similar to SearchContext
Conjunctive query
Example input:
$data = array(
'FieldName' => 'data'
'AnotherField' => 32,
'NotIncludedField' => 'blah'
);
$required = array(
'FieldName',
'AnotherField',
'ARequiredField'
);
Example output:
"FieldName" = 'data' AND "AnotherField" = 32 AND "ARequiredField" IS NULL
ファイルを表示
Open project: burnbright/silverstripe-shop
Class Usage Examples
Protected Properties
Public Methods
Method Details
__construct()
public method
getFilter()
public method
Property Details
$className protected_oe property
$data protected_oe property
$required protected_oe property