PHP Trait LdapTools\Ldif\Entry\LdifEntryTrait

Author: Chad Sikorra ([email protected])
Inheritance: use trait LdapTools\Ldif\LdifStringBuilderTrait
Show file Open project: ldaptools/ldaptools

Protected Properties

Property Type Description
$changeType The changetype for the entry.
$controls LdapTools\Connection\LdapControl[]
$dn The DN represented by this LDIF entry.
$type The LDAP object type this entry is based off of.

Public Methods

Method Description
addControl ( LdapControl $control ) Add a LDAP control that should be used when processing this entry.
getControls ( ) : LdapControl[] Get the controls for this entry.
getDn ( ) : string Get the DN for the LDIF entry.
getType ( ) : null | string Get the LDAP object type this entry represents. See 'setType()' for more information.
setDn ( string $dn ) Set the DN for the LDIF entry.
setType ( string | null $type ) Set the LDAP object type this entry should represent. This is a string from the schema for the domain, such as 'user', 'group', 'contact', etc. If this is not null then the schema definition is used when transforming the entry to a string/operation.

Protected Methods

Method Description
addControlsToString ( string $ldif ) : string Add any LDAP controls to the specified LDIF.
getCommonString ( string | null $dn = null ) : string Get the base start of the string for a LDIF entry (comments, DN, changetype, controls).
hydrateOperation ( OperationHydrator $hydrator, LdapTools\Operation\LdapOperationInterface $operation ) : LdapTools\Operation\LdapOperationInterface
isUnicodePwdHackNeeded ( ) : boolean Determine if we might need to work around the unusual formatting for unicodePwd. This is pretty much the only attribute that will ever need a special case for conversion for LDIF creation.

Method Details

addControl() public method

Add a LDAP control that should be used when processing this entry.
public addControl ( LdapControl $control )
$control LdapTools\Connection\LdapControl

addControlsToString() protected method

Add any LDAP controls to the specified LDIF.
protected addControlsToString ( string $ldif ) : string
$ldif string
return string

getCommonString() protected method

Get the base start of the string for a LDIF entry (comments, DN, changetype, controls).
protected getCommonString ( string | null $dn = null ) : string
$dn string | null
return string

getControls() public method

Get the controls for this entry.
public getControls ( ) : LdapControl[]
return LdapTools\Connection\LdapControl[]

getDn() public method

Get the DN for the LDIF entry.
public getDn ( ) : string
return string

getType() public method

Get the LDAP object type this entry represents. See 'setType()' for more information.
public getType ( ) : null | string
return null | string

hydrateOperation() protected method

protected hydrateOperation ( OperationHydrator $hydrator, LdapTools\Operation\LdapOperationInterface $operation ) : LdapTools\Operation\LdapOperationInterface
$hydrator LdapTools\Hydrator\OperationHydrator
$operation LdapTools\Operation\LdapOperationInterface
return LdapTools\Operation\LdapOperationInterface

isUnicodePwdHackNeeded() protected method

Determine if we might need to work around the unusual formatting for unicodePwd. This is pretty much the only attribute that will ever need a special case for conversion for LDIF creation.
protected isUnicodePwdHackNeeded ( ) : boolean
return boolean

setDn() public method

Set the DN for the LDIF entry.
public setDn ( string $dn )
$dn string

setType() public method

Set the LDAP object type this entry should represent. This is a string from the schema for the domain, such as 'user', 'group', 'contact', etc. If this is not null then the schema definition is used when transforming the entry to a string/operation.
public setType ( string | null $type )
$type string | null

Property Details

$changeType protected property

The changetype for the entry.
protected $changeType

$controls protected property

protected LdapControl[],LdapTools\Connection $controls
return LdapTools\Connection\LdapControl[]

$dn protected property

The DN represented by this LDIF entry.
protected $dn

$type protected property

The LDAP object type this entry is based off of.
protected $type