PHP Class LdapTools\Utilities\ArrayToOperator

Author: Chad Sikorra ([email protected])
Show file Open project: ldaptools/ldaptools Class Usage Examples

Protected Properties

Property Type Description
$filterBuilder LdapTools\Query\Builder\FilterBuilder
$filterMethods array
$opMap Maps some common operator names to their function names.
$schema LdapTools\Schema\LdapObjectSchema

Public Methods

Method Description
__construct ( )
getOperatorForSchema ( LdapObjectSchema $schema, array $filter ) : BaseOperator Given a schema object and a filter array, construct the operator to be used for the schema.
toOperator ( array $filter ) : BaseOperator Given an array that represents different filter methods, return the operator representation of it.

Protected Methods

Method Description
getCategoryOperator ( $objectCategory ) : null | Comparison
getClassOperator ( array $objectClass ) : bAnd | null
getOperatorForArray ( array $filter, BaseOperator $operator = null ) : BaseOperator
getOperatorMethodName ( $name ) : mixed | null
parseFilterToOperators ( array $filter ) : BaseOperator[]
processOperatorAndArguments ( mixed $name, mixed $value ) : BaseOperator

Method Details

__construct() public method

public __construct ( )

getCategoryOperator() protected method

protected getCategoryOperator ( $objectCategory ) : null | Comparison
$objectCategory
return null | LdapTools\Query\Operator\Comparison

getClassOperator() protected method

protected getClassOperator ( array $objectClass ) : bAnd | null
$objectClass array
return LdapTools\Query\Operator\bAnd | null

getOperatorForArray() protected method

protected getOperatorForArray ( array $filter, BaseOperator $operator = null ) : BaseOperator
$filter array
$operator LdapTools\Query\Operator\BaseOperator
return LdapTools\Query\Operator\BaseOperator

getOperatorForSchema() public method

Given a schema object and a filter array, construct the operator to be used for the schema.
public getOperatorForSchema ( LdapObjectSchema $schema, array $filter ) : BaseOperator
$schema LdapTools\Schema\LdapObjectSchema
$filter array
return LdapTools\Query\Operator\BaseOperator

getOperatorMethodName() protected method

protected getOperatorMethodName ( $name ) : mixed | null
$name
return mixed | null

parseFilterToOperators() protected method

protected parseFilterToOperators ( array $filter ) : BaseOperator[]
$filter array
return LdapTools\Query\Operator\BaseOperator[]

processOperatorAndArguments() protected method

protected processOperatorAndArguments ( mixed $name, mixed $value ) : BaseOperator
$name mixed
$value mixed
return LdapTools\Query\Operator\BaseOperator

toOperator() public method

Given an array that represents different filter methods, return the operator representation of it.
public toOperator ( array $filter ) : BaseOperator
$filter array
return LdapTools\Query\Operator\BaseOperator

Property Details

$filterBuilder protected property

protected FilterBuilder,LdapTools\Query\Builder $filterBuilder
return LdapTools\Query\Builder\FilterBuilder

$filterMethods protected property

protected array $filterMethods
return array

$opMap protected property

Maps some common operator names to their function names.
protected $opMap

$schema protected property

protected LdapObjectSchema,LdapTools\Schema $schema
return LdapTools\Schema\LdapObjectSchema