PHP Class LdapTools\Object\LdapObject

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

Protected Properties

Свойство Type Description
$attributes The attributes and values that represent this LDAP object.
$batches A collection of Batch objects for changes to be sent to LDAP.
$functions These are the expected "magic" function calls for the attributes.
$type The type as defined in the schema, if any.

Méthodes publiques

Méthode Description
__call ( string $method, array $arguments ) : mixed Determines which function, if any, should be called.
__construct ( array $attributes, string $type = '' )
__get ( string $attribute ) : mixed Magic property getter.
__isset ( string $attribute ) : boolean Magically check for an attributes existence on an isset call.
__set ( string $attribute, mixed $value ) Magic property setter.
__toString ( ) : string
add ( string $attribute, $values ) Add an additional value, or values, to an attribute.
get ( string $attribute ) : mixed Get the value of an attribute. An attribute with multiple values will return an array of values.
getBatchCollection ( ) : BatchCollection Get the BatchCollection object.
getType ( ) : string Get the LDAP type for this object.
has ( string $attribute, mixed $value = null ) : boolean Check to see if a specific attribute exists. Optionally check if it exists with a specific value.
isType ( string $type ) : boolean Check if this LDAP Object is a specific type (Schema type).
refresh ( array $attributes ) Updates a set of attributes/values on the object without incurring a tracked modification.
remove ( string $attribute, $values ) Remove a specific value, or multiple values, from an attribute.
reset ( $attributes ) Resets the attribute, which effectively removes any values it may have.
set ( string $attribute, mixed $value ) Set a value for an attribute.
setBatchCollection ( BatchCollection $batches ) Sets the BatchCollection.
toArray ( ) : array The array representation of the LDAP object.

Méthodes protégées

Méthode Description
addAttributeValue ( mixed $value, mixed $valueToAdd ) : array Adds an additional value to an existing LDAP attribute value.
attributeHasValue ( string $attribute, mixed $value ) : boolean Check if an attribute has a specific value. Called only when the attribute is known to exist already.
removeAttributeValue ( mixed $value, mixed $valueToRemove ) : mixed Given the original value, remove if it's present.
resolveAttributeName ( string $attribute ) : string Retrieve the attribute in the case it exists in the array.

Method Details

__call() public méthode

Determines which function, if any, should be called.
public __call ( string $method, array $arguments ) : mixed
$method string
$arguments array
Résultat mixed

__construct() public méthode

public __construct ( array $attributes, string $type = '' )
$attributes array
$type string

__get() public méthode

Magic property getter.
public __get ( string $attribute ) : mixed
$attribute string
Résultat mixed

__isset() public méthode

Magically check for an attributes existence on an isset call.
public __isset ( string $attribute ) : boolean
$attribute string
Résultat boolean

__set() public méthode

Magic property setter.
public __set ( string $attribute, mixed $value )
$attribute string
$value mixed

__toString() public méthode

public __toString ( ) : string
Résultat string

add() public méthode

Add an additional value, or values, to an attribute.
public add ( string $attribute, $values )
$attribute string
$values

addAttributeValue() protected méthode

Adds an additional value to an existing LDAP attribute value.
protected addAttributeValue ( mixed $value, mixed $valueToAdd ) : array
$value mixed
$valueToAdd mixed
Résultat array

attributeHasValue() protected méthode

Check if an attribute has a specific value. Called only when the attribute is known to exist already.
protected attributeHasValue ( string $attribute, mixed $value ) : boolean
$attribute string
$value mixed
Résultat boolean

get() public méthode

Get the value of an attribute. An attribute with multiple values will return an array of values.
public get ( string $attribute ) : mixed
$attribute string
Résultat mixed

getBatchCollection() public méthode

Get the BatchCollection object.
public getBatchCollection ( ) : BatchCollection
Résultat LdapTools\BatchModify\BatchCollection

getType() public méthode

Get the LDAP type for this object.
public getType ( ) : string
Résultat string

has() public méthode

Check to see if a specific attribute exists. Optionally check if it exists with a specific value.
public has ( string $attribute, mixed $value = null ) : boolean
$attribute string
$value mixed
Résultat boolean

isType() public méthode

Check if this LDAP Object is a specific type (Schema type).
public isType ( string $type ) : boolean
$type string
Résultat boolean

refresh() public méthode

Updates a set of attributes/values on the object without incurring a tracked modification.
public refresh ( array $attributes )
$attributes array

remove() public méthode

Remove a specific value, or multiple values, from an attribute.
public remove ( string $attribute, $values )
$attribute string
$values

removeAttributeValue() protected méthode

Given the original value, remove if it's present.
protected removeAttributeValue ( mixed $value, mixed $valueToRemove ) : mixed
$value mixed
$valueToRemove mixed
Résultat mixed

reset() public méthode

Resets the attribute, which effectively removes any values it may have.
public reset ( $attributes )
$attributes

resolveAttributeName() protected méthode

Retrieve the attribute in the case it exists in the array.
protected resolveAttributeName ( string $attribute ) : string
$attribute string
Résultat string

set() public méthode

If a value already exists it will be replaced. If the value is empty the attribute will be cleared/reset.
public set ( string $attribute, mixed $value )
$attribute string
$value mixed

setBatchCollection() public méthode

Sets the BatchCollection.
public setBatchCollection ( BatchCollection $batches )
$batches LdapTools\BatchModify\BatchCollection

toArray() public méthode

The array representation of the LDAP object.
public toArray ( ) : array
Résultat array

Property Details

$attributes protected_oe property

The attributes and values that represent this LDAP object.
protected $attributes

$batches protected_oe property

A collection of Batch objects for changes to be sent to LDAP.
protected $batches

$functions protected_oe property

These are the expected "magic" function calls for the attributes.
protected $functions

$type protected_oe property

The type as defined in the schema, if any.
protected $type