PHP Class LdapTools\Resolver\ParameterResolver

Author: Chad Sikorra ([email protected])
Afficher le fichier Open project: ldaptools/ldaptools Class Usage Examples

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
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.

Method Details

__construct() public méthode

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

checkForCircularDependency() protected méthode

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() protected méthode

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

evaluateRequirements() protected méthode

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() protected méthode

Checks for required parameter attributes that depend on other parameter attributes. Returns an array of of dependencies.
protected getDependentAttributes ( array $parameters ) : array
$parameters array
Résultat array

getParametersInValue() protected static méthode

Given an attribute value get all parameters it expects.
protected static getParametersInValue ( string | array $value ) : array
$value string | array
Résultat array

getValueForParameters() protected méthode

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.
Résultat string The attribute value after the passed parameters have been set.

hasParameters() public static méthode

Check whether the value has any parameters in it.
public static hasParameters ( array | string $value ) : boolean
$value array | string
Résultat boolean

resolve() public méthode

Gets the attributes with all of the parameters resolved.
public resolve ( ) : array
Résultat array

resolveAllParameters() protected méthode

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

resolveParametersForAttribute() protected méthode

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() protected méthode

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

Property Details

$attributes protected_oe property

All of the attributes to iterate through.
protected $attributes

$parameters protected_oe property

Any explicitly set parameters.
protected $parameters

$requirements protected_oe property

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

$resolvedParameters protected_oe property

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