API documentation¶
Plugin¶
-
LdapiHelper::Plugin : public BasePlugin Plugin for LdapiHelper
This class is only a stub so it can be easily found through namespace.
LDAPIConnection¶
-
LdapiHelper::LDAP::LDAPIConnection Static wrapper to share a single LDAPI instance
Public Static Functions
-
static LdapiHelper\LDAP\LDAPIConnection::get() Get LDAP reference
- Return
LDAPI
-
static LdapiHelper\LDAP\LDAPIConnection::setTestLdapi() Set local LDAPI instance to a test version
- Return
void
-
LdapiBehavior¶
-
LdapiHelper::Model::Behavior::LdapiBehavior : public Behavior LdapiBehavior behavior
Public Functions
-
LdapiHelper\Model\Behavior\LdapiBehavior::findWithCommittees(Query $query, array $options) Include LDAPCommittee objects through LDAPI
The model on which this finder works must have the committee_id field!
- Return
Query
- Parameters
$query:$options:
-
LdapiHelper\Model\Behavior\LdapiBehavior::findWithUsers(Query $query, array $options) Include LDAPUser objects through LDAPI
The model on which this finder works must have the user_id field!
- Return
Query
- Parameters
$query:$options:
-
LdapiHelper\Model\Behavior\LdapiBehavior::formatterObjects(CollectionInterface $results) Takes in the results collection of a ORM query and process the results
Returns a modified collection, in this case included with LDAPI objects.
- Return
CollectionInterface
- Parameters
$results:
-
LdapiTrait¶
(Auto doc not supported for PHP Traits.)
-
LdapiHelper::TestSuite::LdapiTrait Include this trait in your test case to fake calls to the LDAP: use LdapiTrait; Instead of trying to use a remote connection, the local fixture files are used.
TestLdapi¶
-
LdapiHelper::TestSuite::TestLdapi : public LDAPI Test extension of LDAPI
Relies on local fixtures instead of an actual connection. For this test version, no LDAP server is needed.
The basic connect and get functions are overloaded, such that the LDAPI and the returned objects still behave regularly.
Public Functions
-
LdapiHelper\TestSuite\TestLdapi::__construct() Overloaded constructor
-
LdapiHelper\TestSuite\TestLdapi::__destruct() Overloaded destructor
-
LdapiHelper\TestSuite\TestLdapi::_saveNewObject( $object, $class, $additional_fields = null) Save an object by updating the registered fixtures
- Return
bool
- Parameters
$object:$class:$additional_fields:
-
LdapiHelper\TestSuite\TestLdapi::_saveUpdatedObject( $object, $class) Update fixtures with modified object
- Return
boolean
- Parameters
$object:$class: “LDAPUser” or “LDAPCommittee”
-
LdapiHelper\TestSuite\TestLdapi::_getEmailForward( $user) Returned fixtured email forward
- Return
false|string|void
- Parameters
$user:
-
LdapiHelper\TestSuite\TestLdapi::_saveEmailForward( $user, $email) Update fixtured email forward
- Return
bool|null
- Parameters
$user:$email:
-
LdapiHelper\TestSuite\TestLdapi::deleteCommittee( $committee) Remove a fixtured committee
- Return
boolean
- Parameters
$committee:
-
LdapiHelper\TestSuite\TestLdapi::deleteUser( $user) Remove a fixtured user
- Return
boolean
- Parameters
$user:
-
LdapiHelper\TestSuite\TestLdapi::_writeCheck() Enable write check by default
- Return
bool
Public Static Attributes
-
static $_users = []
-
static $_committees = []
-
static $_forwards = []
-
TestFixture¶
-
LdapiHelper::TestSuite::Fixture::TestFixture Public Functions
-
LdapiHelper\TestSuite\Fixture\TestFixture::__construct() Constructor
-
LdapiHelper\TestSuite\Fixture\TestFixture::init() Init
Let user overload to fill in records (and base_record)
-
LdapiHelper\TestSuite\Fixture\TestFixture::load( $ldapi) Load this fixture into the LDAP test storage
- Parameters
$ldapi:
-