\Ingo_Transport_Ldap

Ingo_Transport_Ldap implements an Ingo transport driver to allow scripts to be installed and set active via an LDAP server.

Summary

Methods
Properties
Constants
__construct()
setScriptActive()
supportShares()
quote()
getScript()
No public properties found
No constants found
_substUser()
_connect()
_getScripts()
$_params
$_supportShares
N/A
No private methods found
No private properties found
N/A

Properties

$_params

$_params : array

Congifuration parameters.

Type

array

$_supportShares

$_supportShares : boolean

Whether this driver allows managing other users' rules.

Type

boolean

Methods

__construct()

__construct(array  $params = array()) 

Constructor.

Parameters

array $params

Configuration parameters.

Throws

\Ingo_Exception

setScriptActive()

setScriptActive(array  $script) 

Sets a script running on the backend.

Parameters

array $script

The filter script information. Passed elements:

  • 'name': (string) the script name.
  • 'recipes': (array) the filter recipe objects.
  • 'script': (string) the filter script.

Throws

\Ingo_Exception

supportShares()

supportShares() : boolean

Returns whether the driver supports managing other users' rules.

Returns

boolean —

True if the driver supports shares.

quote()

quote(string  $string) : string

Quotes user input if supported by the transport driver.

Parameters

string $string

A string to quote.

Returns

string —

The quoted string.

getScript()

getScript() : string

Returns the content of the currently active script.

Throws

\Ingo_Exception

Returns

string —

The complete ruleset of the specified user.

_substUser()

_substUser(string  $templ) : string

Create a DN from a DN template.

This is done by substituting the username for %u and the 'dc=' components for %d.

Parameters

string $templ

The DN template (from the config).

Returns

string —

The resulting DN.

_connect()

_connect() 

Connect and bind to ldap server.

Throws

\Ingo_Exception

_getScripts()

_getScripts(resource  $ldapcn, string  $userDN) : array

Retrieve current user's scripts.

Parameters

resource $ldapcn

The connection to the LDAP server.

string $userDN

Set to the user object's real DN.

Throws

\Ingo_Exception

Returns

array —

Script sources list.