Свойство | Тип | Описание | |
---|---|---|---|
$changeTypeMap | A simple changetype to full class name mapping. | ||
$commentQueue | Any comments pending for the next entry in the LDIF. | ||
$line | The current line number we are on during parsing. | ||
$lines | string[] | ||
$urlLoaders | LdapTools\Ldif\UrlLoader\UrlLoaderInterface[] | An array of UrlLoaders with the key set to the type of URL they handle. |
Метод | Описание | |
---|---|---|
__construct ( ) | ||
hasUrlLoader ( string $type ) : boolean | Check if a URL loader for a specific URL type exists. | |
parse ( string $ldif ) : |
Parses a string containing LDIF data and returns an object with the entries it contains. | |
removeUrlLoader ( string $type ) | Remove a URL loader by its string type. | |
setUrlLoader ( string $type, LdapTools\Ldif\UrlLoader\UrlLoaderInterface $loader ) | Set a URL loader to be used by the parser. |
Метод | Описание | |
---|---|---|
addCommentToQueueOrLdif ( |
Determine whether the comment should be added to the LDIF itself, or if it's a comment for an entry within the LDIF. If it's for an entry in the LDIF, then we make the assumption that we an empty line separates comments between the LDIF comments overall and the start of a comment for an entry. This seems like the most reasonable way to do it, though it still may not be perfect. | |
addDirectiveToEntry ( string $key, string $value, LdapTools\Ldif\Entry\LdifEntryInterface $entry ) | Figures out what to add to the LDIF entry for a specific key/value directive given. | |
addModDnDirective ( |
||
addModifyDirective ( |
||
cleanup ( ) | Do a bit of cleanup post parsing. | |
currentLine ( ) : boolean | string | ||
getBoolFromStringBool ( string $value ) : boolean | Convert an expected string "true" or "false" to bool. | |
getBoolFromStringInt ( string $value ) : boolean | Convert an expected string "0" or "1" to bool. | |
getContinuedValues ( $value ) : string | Check for any continued values and concatenate them into one. | |
getKeyAndValue ( string $line ) : array | ||
getLdapControl ( string $value ) : |
Validate a control directive and get the value for the control and the criticality. | |
getLdifEntryObject ( string $dn, string $changeType ) : LdapTools\Ldif\Entry\LdifEntryInterface | Get the LdifEntry for the changetype. | |
getValueFromUrl ( string $url ) : string | Get the value of the URL data via a UrlLoader. | |
getValuesForModifyAction ( string $attribute, string $action ) : array | ||
isComment ( ) : boolean | Check if the current line is a comment. | |
isCommonDirective ( ) : boolean | Check if the line is a directive common to any change type (ie. changetype or control). | |
isContinuedValue ( string $line ) : boolean | Check if a line is a continuation of a previous value. | |
isEndOfEntry ( ) : boolean | Check if we are at the end of a LDIF entry. | |
isEndOfLdif ( ) : boolean | Check if we are at the end of the LDIF string. | |
isStartOfEntry ( ) : boolean | Checks for the start of a LDIF entry on the current line. | |
nextLine ( boolean $advance = true ) : string | false | ||
parseCommonDirectives ( $dn ) : LdapTools\Ldif\Entry\LdifEntryInterface | Parses directives that are potentially common to all entries and returns the LdifEntry object. Common directives include: changetype, control | |
parseEntry ( ) : LdapTools\Ldif\Entry\LdifEntryInterface | Parse an entry from the DN position until we reach the start of the next entry. Return the entry that was parsed. | |
setLdifVersion ( |
||
setup ( string $ldif ) | ||
startsWith ( string $value, null | string $line = null ) : boolean | Check if the current line starts with a specific value. | |
throwException ( string $message ) | A simple helper to add additional information to the exception. | |
validateDirectiveInChange ( string $type, string $directive ) |
protected addCommentToQueueOrLdif ( |
||
$ldif |
protected addDirectiveToEntry ( string $key, string $value, LdapTools\Ldif\Entry\LdifEntryInterface $entry ) | ||
$key | string | |
$value | string | |
$entry | LdapTools\Ldif\Entry\LdifEntryInterface |
protected addModDnDirective ( |
||
$entry | ||
$key | string | |
$value | string |
protected addModifyDirective ( |
||
$entry | ||
$key | string | |
$value | string |
protected currentLine ( ) : boolean | string | ||
Результат | boolean | string |
protected getBoolFromStringBool ( string $value ) : boolean | ||
$value | string | |
Результат | boolean |
protected getBoolFromStringInt ( string $value ) : boolean | ||
$value | string | |
Результат | boolean |
protected getContinuedValues ( $value ) : string | ||
$value | ||
Результат | string |
protected getKeyAndValue ( string $line ) : array | ||
$line | string | |
Результат | array |
protected getLdapControl ( string $value ) : |
||
$value | string | |
Результат |
protected getLdifEntryObject ( string $dn, string $changeType ) : LdapTools\Ldif\Entry\LdifEntryInterface | ||
$dn | string | |
$changeType | string | |
Результат | LdapTools\Ldif\Entry\LdifEntryInterface |
protected getValueFromUrl ( string $url ) : string | ||
$url | string | |
Результат | string |
public hasUrlLoader ( string $type ) : boolean | ||
$type | string | |
Результат | boolean |
protected isCommonDirective ( ) : boolean | ||
Результат | boolean |
protected isContinuedValue ( string $line ) : boolean | ||
$line | string | |
Результат | boolean |
protected isEndOfEntry ( ) : boolean | ||
Результат | boolean |
protected isEndOfLdif ( ) : boolean | ||
Результат | boolean |
protected isStartOfEntry ( ) : boolean | ||
Результат | boolean |
protected parseCommonDirectives ( $dn ) : LdapTools\Ldif\Entry\LdifEntryInterface | ||
$dn | ||
Результат | LdapTools\Ldif\Entry\LdifEntryInterface |
protected parseEntry ( ) : LdapTools\Ldif\Entry\LdifEntryInterface | ||
Результат | LdapTools\Ldif\Entry\LdifEntryInterface |
public removeUrlLoader ( string $type ) | ||
$type | string |
protected setLdifVersion ( |
||
$ldif | ||
$version | integer |
public setUrlLoader ( string $type, LdapTools\Ldif\UrlLoader\UrlLoaderInterface $loader ) | ||
$type | string | The URL type (ie. file, http, etc) |
$loader | LdapTools\Ldif\UrlLoader\UrlLoaderInterface |
protected throwException ( string $message ) | ||
$message | string |
protected validateDirectiveInChange ( string $type, string $directive ) | ||
$type | string | The changetype. |
$directive | string | The directive used. |
protected $changeTypeMap |
protected $commentQueue |