Ingo_Transport_Ldap
extends Ingo_Transport_Base
in package
Ingo_Transport_Ldap implements an Ingo transport driver to allow scripts to be installed and set active via an LDAP server.
Tags
Table of Contents
- $_params : array<string|int, mixed>
- Congifuration parameters.
- $_supportShares : bool
- Whether this driver allows managing other users' rules.
- __construct() : mixed
- Constructor.
- getScript() : string
- Returns the content of the currently active script.
- quote() : string
- Quotes user input if supported by the transport driver.
- setScriptActive() : mixed
- Sets a script running on the backend.
- supportShares() : bool
- Returns whether the driver supports managing other users' rules.
- _connect() : mixed
- Connect and bind to ldap server.
- _getScripts() : array<string|int, mixed>
- Retrieve current user's scripts.
- _substUser() : string
- Create a DN from a DN template.
Properties
$_params
Congifuration parameters.
protected
array<string|int, mixed>
$_params
= array('password' => \null, 'username' => \null)
$_supportShares
Whether this driver allows managing other users' rules.
protected
bool
$_supportShares
= \false
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $params : array<string|int, mixed> = array()
-
Configuration parameters.
Tags
Return values
mixed —getScript()
Returns the content of the currently active script.
public
getScript() : string
Tags
Return values
string —The complete ruleset of the specified user.
quote()
Quotes user input if supported by the transport driver.
public
quote(string $string) : string
Parameters
- $string : string
-
A string to quote.
Return values
string —The quoted string.
setScriptActive()
Sets a script running on the backend.
public
setScriptActive(array<string|int, mixed> $script) : mixed
Parameters
- $script : array<string|int, mixed>
-
The filter script information. Passed elements:
- 'name': (string) the script name.
- 'recipes': (array) the filter recipe objects.
- 'script': (string) the filter script.
Tags
Return values
mixed —supportShares()
Returns whether the driver supports managing other users' rules.
public
supportShares() : bool
Return values
bool —True if the driver supports shares.
_connect()
Connect and bind to ldap server.
protected
_connect() : mixed
Tags
Return values
mixed —_getScripts()
Retrieve current user's scripts.
protected
_getScripts(resource $ldapcn, string &$userDN) : array<string|int, mixed>
Parameters
- $ldapcn : resource
-
The connection to the LDAP server.
- $userDN : string
-
Set to the user object's real DN.
Tags
Return values
array<string|int, mixed> —Script sources list.
_substUser()
Create a DN from a DN template.
protected
_substUser(string $templ) : string
This is done by substituting the username for %u and the 'dc=' components for %d.
Parameters
- $templ : string
-
The DN template (from the config).
Return values
string —The resulting DN.