PHP Class LdapTools\Ldif\Ldif

Author: Chad Sikorra ([email protected])
Inheritance: use trait LdifStringBuilderTrait
Show file Open project: ldaptools/ldaptools Class Usage Examples

Protected Properties

Property Type Description
$connection LdapTools\Connection\LdapConnectionInterface | null
$entries LdapTools\Ldif\Entry\LdifEntryInterface[]
$entryBuilder LdifEntryBuilder
$hydrator LdapTools\Hydrator\OperationHydrator
$schemaFactory LdapTools\Factory\LdapObjectSchemaFactory | null
$version The LDIF version for the entries.

Public Methods

Method Description
__construct ( LdapTools\Connection\LdapConnectionInterface $connection = null, LdapObjectSchemaFactory $schemaFactory = null )
addEntry ( variadic $entries ) Add one or more LDIF entry objects.
entry ( ) : LdifEntryBuilder Used for more fluid addition of entries to the LDIF object.
getEntries ( ) : LdapTools\Ldif\Entry\LdifEntryInterface[] Get the entries represented by this LDIF object.
getVersion ( ) : integer | null Get the LDIF version.
setVersion ( integer $version ) Set the LDIF version.
toOperations ( ) : LdapTools\Operation\LdapOperationInterface[] Get all of the operations represented by all of the entries for this LDIF object.
toString ( ) : string Get the string representation of the LDIF object with all of the entries it has.

Protected Methods

Method Description
getSchemaForType ( string $type ) : LdapObjectSchema
setupEntry ( LdapTools\Ldif\Entry\LdifEntryInterface $entry )

Method Details

__construct() public method

public __construct ( LdapTools\Connection\LdapConnectionInterface $connection = null, LdapObjectSchemaFactory $schemaFactory = null )
$connection LdapTools\Connection\LdapConnectionInterface
$schemaFactory LdapTools\Factory\LdapObjectSchemaFactory

addEntry() public method

Add one or more LDIF entry objects.
public addEntry ( variadic $entries )
$entries variadic

entry() public method

Used for more fluid addition of entries to the LDIF object.
public entry ( ) : LdifEntryBuilder
return LdifEntryBuilder

getEntries() public method

Get the entries represented by this LDIF object.
public getEntries ( ) : LdapTools\Ldif\Entry\LdifEntryInterface[]
return LdapTools\Ldif\Entry\LdifEntryInterface[]

getSchemaForType() protected method

protected getSchemaForType ( string $type ) : LdapObjectSchema
$type string
return LdapTools\Schema\LdapObjectSchema

getVersion() public method

Get the LDIF version.
public getVersion ( ) : integer | null
return integer | null

setVersion() public method

Set the LDIF version.
public setVersion ( integer $version )
$version integer

setupEntry() protected method

protected setupEntry ( LdapTools\Ldif\Entry\LdifEntryInterface $entry )
$entry LdapTools\Ldif\Entry\LdifEntryInterface

toOperations() public method

Get all of the operations represented by all of the entries for this LDIF object.
public toOperations ( ) : LdapTools\Operation\LdapOperationInterface[]
return LdapTools\Operation\LdapOperationInterface[]

toString() public method

Get the string representation of the LDIF object with all of the entries it has.
public toString ( ) : string
return string

Property Details

$connection protected property

protected LdapConnectionInterface,LdapTools\Connection|null $connection
return LdapTools\Connection\LdapConnectionInterface | null

$entries protected property

protected LdifEntryInterface[],LdapTools\Ldif\Entry $entries
return LdapTools\Ldif\Entry\LdifEntryInterface[]

$entryBuilder protected property

protected LdifEntryBuilder,LdapTools\Ldif $entryBuilder
return LdifEntryBuilder

$hydrator protected property

protected OperationHydrator,LdapTools\Hydrator $hydrator
return LdapTools\Hydrator\OperationHydrator

$schemaFactory protected property

protected LdapObjectSchemaFactory,LdapTools\Factory|null $schemaFactory
return LdapTools\Factory\LdapObjectSchemaFactory | null

$version protected property

The LDIF version for the entries.
protected $version