PHP Класс LdapTools\Resolver\ParameterResolver

Автор: Chad Sikorra ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$attributes All of the attributes to iterate through.
$parameters Any explicitly set parameters.
$requirements Contains the attribute name with an array of parameters it requires.
$resolvedParameters Parameters that have been resolved to their final values.

Открытые методы

Метод Описание
__construct ( array $attributes, array $parameters )
hasParameters ( array | string $value ) : boolean Check whether the value has any parameters in it.
resolve ( ) : array Gets the attributes with all of the parameters resolved.

Защищенные методы

Метод Описание
checkForCircularDependency ( string $parent, array $parentParameters ) Given an attribute with parameter dependencies, check if any of them will become circular.
doResolveParametersForAttribute ( string $attribute, array $parameters ) Sets the value for an attribute with the specified parameters.
evaluateRequirements ( array $attributes ) Check all attributes for what parameters they require. This populates the '$this->requirements' array. It will then iterate back over the requirements to check for issues.
getDependentAttributes ( array $parameters ) : array Checks for required parameter attributes that depend on other parameter attributes. Returns an array of of dependencies.
getParametersInValue ( string | array $value ) : array Given an attribute value get all parameters it expects.
getValueForParameters ( array $parameters, array | string $original, array $attributes ) : string Takes all parameters (%username%, %someParameter%) within an attribute value and first checks for explicitly set values for the parameter, then checks to see if the parameter name is a different attribute. If found it takes the value either explicitly set or of the other attribute and replaces it within the original attribute.
resolveAllParameters ( ) Iterates over each requirement to resolve the parameters it contains.
resolveParametersForAttribute ( $attribute, array $parameters ) Given a specific attribute with parameters, this will resolve it while first resolving any dependent attributes that first need to be resolved.
setRequirementsForAttribute ( string $attribute, array $value ) Given an attribute, set what parameters it requires.

Описание методов

__construct() публичный метод

public __construct ( array $attributes, array $parameters )
$attributes array
$parameters array

checkForCircularDependency() защищенный метод

Given an attribute with parameter dependencies, check if any of them will become circular.
protected checkForCircularDependency ( string $parent, array $parentParameters )
$parent string
$parentParameters array

doResolveParametersForAttribute() защищенный метод

Sets the value for an attribute with the specified parameters.
protected doResolveParametersForAttribute ( string $attribute, array $parameters )
$attribute string
$parameters array

evaluateRequirements() защищенный метод

Check all attributes for what parameters they require. This populates the '$this->requirements' array. It will then iterate back over the requirements to check for issues.
protected evaluateRequirements ( array $attributes )
$attributes array

getDependentAttributes() защищенный метод

Checks for required parameter attributes that depend on other parameter attributes. Returns an array of of dependencies.
protected getDependentAttributes ( array $parameters ) : array
$parameters array
Результат array

getParametersInValue() защищенный статический метод

Given an attribute value get all parameters it expects.
protected static getParametersInValue ( string | array $value ) : array
$value string | array
Результат array

getValueForParameters() защищенный метод

Takes all parameters (%username%, %someParameter%) within an attribute value and first checks for explicitly set values for the parameter, then checks to see if the parameter name is a different attribute. If found it takes the value either explicitly set or of the other attribute and replaces it within the original attribute.
protected getValueForParameters ( array $parameters, array | string $original, array $attributes ) : string
$parameters array All of the parameters found within the value.
$original array | string The original value for the attribute, containing the parameters.
$attributes array All of the attributes being sent to LDAP.
Результат string The attribute value after the passed parameters have been set.

hasParameters() публичный статический метод

Check whether the value has any parameters in it.
public static hasParameters ( array | string $value ) : boolean
$value array | string
Результат boolean

resolve() публичный метод

Gets the attributes with all of the parameters resolved.
public resolve ( ) : array
Результат array

resolveAllParameters() защищенный метод

Iterates over each requirement to resolve the parameters it contains.
protected resolveAllParameters ( )

resolveParametersForAttribute() защищенный метод

Given a specific attribute with parameters, this will resolve it while first resolving any dependent attributes that first need to be resolved.
protected resolveParametersForAttribute ( $attribute, array $parameters )
$attribute
$parameters array

setRequirementsForAttribute() защищенный метод

Given an attribute, set what parameters it requires.
protected setRequirementsForAttribute ( string $attribute, array $value )
$attribute string
$value array

Описание свойств

$attributes защищенное свойство

All of the attributes to iterate through.
protected $attributes

$parameters защищенное свойство

Any explicitly set parameters.
protected $parameters

$requirements защищенное свойство

Contains the attribute name with an array of parameters it requires.
protected $requirements

$resolvedParameters защищенное свойство

Parameters that have been resolved to their final values.
protected $resolvedParameters