PHP Trait LdapTools\Utilities\ConverterUtilitiesTrait

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

Public Methods

Method Description
getAttribute ( ) : string
getBatch ( ) : Batch | null
getDn ( ) : string | null
getLastValue ( ) : mixed
getLdapConnection ( ) : LdapTools\Connection\LdapConnectionInterface | null
getOperationType ( ) : integer
setLastValue ( $value )

Protected Methods

Method Description
getArrayValue ( array $options, string $key ) Get the value of an array key in a case-insensitive way.
getCurrentLdapAttributeValue ( string $attribute ) : array | string | null This can be called to retrieve the current value of an attribute from LDAP.
modifyMultivaluedAttribute ( array $values, array $newValues ) : array Modifies a multivalued attribute array based off the original values, the new values, and the modification type.
setDefaultLastValue ( string $attribute, mixed $default ) Specify an attribute to query to set as the last value. If that is not found, have it set the value specified by whatever you pass to $default.
validateCurrentAttribute ( array $options ) If the current attribute does not exist in the array, then throw an error.

Method Details

getArrayValue() protected method

Get the value of an array key in a case-insensitive way.
protected getArrayValue ( array $options, string $key )
$options array
$key string

getAttribute() abstract public method

abstract public getAttribute ( ) : string
return string

getBatch() abstract public method

abstract public getBatch ( ) : Batch | null
return LdapTools\BatchModify\Batch | null

getCurrentLdapAttributeValue() protected method

This can be called to retrieve the current value of an attribute from LDAP.
protected getCurrentLdapAttributeValue ( string $attribute ) : array | string | null
$attribute string The attribute name to query for a value from the converter context
return array | string | null

getDn() abstract public method

abstract public getDn ( ) : string | null
return string | null

getLastValue() abstract public method

abstract public getLastValue ( ) : mixed
return mixed

getLdapConnection() abstract public method

abstract public getLdapConnection ( ) : LdapTools\Connection\LdapConnectionInterface | null
return LdapTools\Connection\LdapConnectionInterface | null

getOperationType() abstract public method

abstract public getOperationType ( ) : integer
return integer

modifyMultivaluedAttribute() protected method

Modifies a multivalued attribute array based off the original values, the new values, and the modification type.
protected modifyMultivaluedAttribute ( array $values, array $newValues ) : array
$values array
$newValues array
return array

setDefaultLastValue() protected method

Specify an attribute to query to set as the last value. If that is not found, have it set the value specified by whatever you pass to $default.
protected setDefaultLastValue ( string $attribute, mixed $default )
$attribute string
$default mixed

setLastValue() abstract public method

abstract public setLastValue ( $value )

validateCurrentAttribute() protected method

If the current attribute does not exist in the array, then throw an error.
protected validateCurrentAttribute ( array $options )
$options array