From 2be6fc245220ff42c1bdbdf21ff13e892b99e405 Mon Sep 17 00:00:00 2001 From: jbout Date: Fri, 18 Jul 2014 14:29:51 +0200 Subject: [PATCH 1/2] Update LdapAdapter.php provide static function for instantiation --- model/LdapAdapter.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/model/LdapAdapter.php b/model/LdapAdapter.php index cded547..0b1f6d2 100644 --- a/model/LdapAdapter.php +++ b/model/LdapAdapter.php @@ -57,6 +57,16 @@ class LdapAdapter implements LoginAdapter * @var \Zend\Authentication\Adapter\Ldap */ protected $adapter; + + /** + * Create an adapter from the configuration + * + * @param array $configuration + * @return \oat\authKeyValue\model\AuthKeyValueAdapter + */ + public static function createFromConfig(array $configuration) { + return new self($configuration); + } /** * @param array $configuration @@ -174,4 +184,4 @@ class LdapAdapter implements LoginAdapter } -} \ No newline at end of file +} From 2acbeecabe56b1b638040092eff2731691d7c39a Mon Sep 17 00:00:00 2001 From: jbout Date: Fri, 18 Jul 2014 14:39:37 +0200 Subject: [PATCH 2/2] corrected php-doc --- model/LdapAdapter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/LdapAdapter.php b/model/LdapAdapter.php index 0b1f6d2..77c9e5b 100644 --- a/model/LdapAdapter.php +++ b/model/LdapAdapter.php @@ -62,7 +62,7 @@ class LdapAdapter implements LoginAdapter * Create an adapter from the configuration * * @param array $configuration - * @return \oat\authKeyValue\model\AuthKeyValueAdapter + * @return oat\authLdap\model\LdapAdapter */ public static function createFromConfig(array $configuration) { return new self($configuration);