PHP Class Ingo_Transport_Ldap, horde

Author: Jason M. Felice ([email protected])
Author: Jan Schneider ([email protected])
Inheritance: extends Ingo_Transport_Base
Mostrar archivo Open project: horde/horde

Public Methods

Method Description
__construct ( array $params = [] ) Constructor.
getScript ( ) : string Returns the content of the currently active script.
setScriptActive ( array $script ) Sets a script running on the backend.

Protected Methods

Method Description
_connect ( ) Connect and bind to ldap server.
_getScripts ( resource $ldapcn, string &$userDN ) : array Retrieve current user's scripts.
_substUser ( string $templ ) : string Create a DN from a DN template.

Method Details

__construct() public method

Constructor.
public __construct ( array $params = [] )
$params array

_connect() protected method

Connect and bind to ldap server.
protected _connect ( )

_getScripts() protected method

Retrieve current user's scripts.
protected _getScripts ( resource $ldapcn, string &$userDN ) : array
$ldapcn resource The connection to the LDAP server.
$userDN string Set to the user object's real DN.
return array Script sources list.

_substUser() protected method

This is done by substituting the username for %u and the 'dc=' components for %d.
protected _substUser ( string $templ ) : string
$templ string The DN template (from the config).
return string The resulting DN.

getScript() public method

Returns the content of the currently active script.
public getScript ( ) : string
return string The complete ruleset of the specified user.

setScriptActive() public method

Sets a script running on the backend.
public setScriptActive ( array $script )
$script array The filter script information. Passed elements: - 'name': (string) the script name. - 'recipes': (array) the filter recipe objects. - 'script': (string) the filter script.