PHP Class LdapTools\BatchModify\BatchCollection

Author: Chad Sikorra ([email protected])
Inheritance: implements IteratorAggregate
Datei anzeigen Open project: ldaptools/ldaptools Class Usage Examples

Protected Properties

Property Type Description
$batches Batch[]
$dn The distinguished name of the LDAP object these batches will target.

Public Methods

Method Description
__clone ( ) When a batch collection is cloned, we want to make sure the batch objects are cloned as well.
__construct ( string | null $dn = null )
add ( Batch $batch ) Add an individual batch action to the collection.
get ( integer $index ) : Batch Get a specific batch from the collection by its index number in the array.
getBatchArray ( ) : array Get an array that represents the array form of each batch action to be sent to LDAP.
getDn ( ) : string Get the distinguished name of the LDAP object this batch will target.
getIterator ( ) : ArrayIterator Allows this object to be iterated over.
has ( integer $index ) : boolean Check if a specific batch index exists.
remove ( integer $index ) : Batch Remove a specific batch from the collection by its index number in the array.
setDn ( string $dn ) Set the distinguished name of the LDAP object this batch will target.
toArray ( ) : Batch[] Get an array containing all the batch action objects.

Protected Methods

Method Description
validateBatchIndexExists ( integer $index ) Checks to make sure that the index actually exists.

Method Details

__clone() public method

When a batch collection is cloned, we want to make sure the batch objects are cloned as well.
public __clone ( )

__construct() public method

public __construct ( string | null $dn = null )
$dn string | null

add() public method

Add an individual batch action to the collection.
public add ( Batch $batch )
$batch Batch

get() public method

Get a specific batch from the collection by its index number in the array.
public get ( integer $index ) : Batch
$index integer
return Batch

getBatchArray() public method

Get an array that represents the array form of each batch action to be sent to LDAP.
public getBatchArray ( ) : array
return array

getDn() public method

Get the distinguished name of the LDAP object this batch will target.
public getDn ( ) : string
return string

getIterator() public method

Allows this object to be iterated over.

has() public method

Check if a specific batch index exists.
public has ( integer $index ) : boolean
$index integer
return boolean

remove() public method

Remove a specific batch from the collection by its index number in the array.
public remove ( integer $index ) : Batch
$index integer
return Batch

setDn() public method

Set the distinguished name of the LDAP object this batch will target.
public setDn ( string $dn )
$dn string

toArray() public method

Get an array containing all the batch action objects.
public toArray ( ) : Batch[]
return Batch[]

validateBatchIndexExists() protected method

Checks to make sure that the index actually exists.
protected validateBatchIndexExists ( integer $index )
$index integer

Property Details

$batches protected_oe property

protected Batch[],LdapTools\BatchModify $batches
return Batch[]

$dn protected_oe property

The distinguished name of the LDAP object these batches will target.
protected $dn