Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
ldap
Commits
e8fe4a66
Commit
e8fe4a66
authored
Mar 10, 2019
by
Bertrand Gauthier
Browse files
Corrections pour passer à ZF3.
parent
dc4411a6
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/UnicaenLdap/LdapFactory.php
View file @
e8fe4a66
...
...
@@ -2,6 +2,7 @@
namespace
UnicaenLdap
;
use
Interop\Container\ContainerInterface
;
use
Zend\ServiceManager\FactoryInterface
;
use
Zend\ServiceManager\ServiceLocatorInterface
;
...
...
@@ -12,16 +13,15 @@ use Zend\ServiceManager\ServiceLocatorInterface;
*/
class
LdapFactory
implements
FactoryInterface
{
/**
* Create service
*
* @param ServiceLocatorInterface $serviceLocator
* @return Ldap
*/
public
function
createService
(
ServiceLocatorInterface
$serviceLocator
)
{
return
$this
->
__invoke
(
$serviceLocator
,
'?'
);
}
public
function
__invoke
(
ContainerInterface
$container
,
$requestedName
,
array
$options
=
null
)
{
/* @var $options \UnicaenLdap\Options\ModuleOptions */
$options
=
$
serviceLocato
r
->
get
(
'ldapOptions'
);
$options
=
$
containe
r
->
get
(
'ldapOptions'
);
return
new
Ldap
(
$options
->
getLdap
()
);
}
...
...
src/UnicaenLdap/Options/ModuleOptionsFactory.php
View file @
e8fe4a66
...
...
@@ -2,6 +2,7 @@
namespace
UnicaenLdap\Options
;
use
Interop\Container\ContainerInterface
;
use
Zend\ServiceManager\FactoryInterface
;
use
Zend\ServiceManager\ServiceLocatorInterface
;
...
...
@@ -12,15 +13,14 @@ use Zend\ServiceManager\ServiceLocatorInterface;
*/
class
ModuleOptionsFactory
implements
FactoryInterface
{
/**
* Create service
*
* @param ServiceLocatorInterface $serviceLocator
* @return ModuleOptions
*/
public
function
createService
(
ServiceLocatorInterface
$serviceLocator
)
{
$config
=
$serviceLocator
->
get
(
'Configuration'
);
return
$this
->
__invoke
(
$serviceLocator
,
'?'
);
}
public
function
__invoke
(
ContainerInterface
$container
,
$requestedName
,
array
$options
=
null
)
{
$config
=
$container
->
get
(
'Configuration'
);
$moduleConfig
=
isset
(
$config
[
'unicaen-ldap'
])
?
$config
[
'unicaen-ldap'
]
:
array
();
return
new
ModuleOptions
(
$moduleConfig
);
...
...
src/UnicaenLdap/Service/GenericFactory.php
View file @
e8fe4a66
...
...
@@ -2,6 +2,7 @@
namespace
UnicaenLdap\Service
;
use
Interop\Container\ContainerInterface
;
use
Zend\ServiceManager\FactoryInterface
;
use
Zend\ServiceManager\ServiceLocatorInterface
;
...
...
@@ -12,17 +13,16 @@ use Zend\ServiceManager\ServiceLocatorInterface;
*/
class
GenericFactory
implements
FactoryInterface
{
/**
* Create service
*
* @param ServiceLocatorInterface $serviceLocator
* @return Generic
*/
public
function
createService
(
ServiceLocatorInterface
$serviceLocator
)
{
return
$this
->
__invoke
(
$serviceLocator
,
'?'
);
}
public
function
__invoke
(
ContainerInterface
$container
,
$requestedName
,
array
$options
=
null
)
{
$service
=
new
Generic
();
$service
->
setServiceLocator
(
$
serviceLocato
r
);
$service
->
setServiceLocator
(
$
containe
r
);
return
$service
;
}
...
...
src/UnicaenLdap/Service/GroupFactory.php
View file @
e8fe4a66
...
...
@@ -2,6 +2,7 @@
namespace
UnicaenLdap\Service
;
use
Interop\Container\ContainerInterface
;
use
Zend\ServiceManager\FactoryInterface
;
use
Zend\ServiceManager\ServiceLocatorInterface
;
...
...
@@ -12,17 +13,16 @@ use Zend\ServiceManager\ServiceLocatorInterface;
*/
class
GroupFactory
implements
FactoryInterface
{
/**
* Create service
*
* @param ServiceLocatorInterface $serviceLocator
* @return Group
*/
public
function
createService
(
ServiceLocatorInterface
$serviceLocator
)
{
return
$this
->
__invoke
(
$serviceLocator
,
'?'
);
}
public
function
__invoke
(
ContainerInterface
$container
,
$requestedName
,
array
$options
=
null
)
{
$service
=
new
Group
();
$service
->
setServiceLocator
(
$
serviceLocato
r
);
$service
->
setServiceLocator
(
$
containe
r
);
return
$service
;
}
...
...
src/UnicaenLdap/Service/PeopleFactory.php
View file @
e8fe4a66
...
...
@@ -2,6 +2,7 @@
namespace
UnicaenLdap\Service
;
use
Interop\Container\ContainerInterface
;
use
Zend\ServiceManager\FactoryInterface
;
use
Zend\ServiceManager\ServiceLocatorInterface
;
...
...
@@ -12,17 +13,16 @@ use Zend\ServiceManager\ServiceLocatorInterface;
*/
class
PeopleFactory
implements
FactoryInterface
{
/**
* Create service
*
* @param ServiceLocatorInterface $serviceLocator
* @return People
*/
public
function
createService
(
ServiceLocatorInterface
$serviceLocator
)
{
return
$this
->
__invoke
(
$serviceLocator
,
'?'
);
}
public
function
__invoke
(
ContainerInterface
$container
,
$requestedName
,
array
$options
=
null
)
{
$service
=
new
People
();
$service
->
setServiceLocator
(
$
serviceLocato
r
);
$service
->
setServiceLocator
(
$
containe
r
);
return
$service
;
}
...
...
src/UnicaenLdap/Service/StructureFactory.php
View file @
e8fe4a66
...
...
@@ -2,6 +2,7 @@
namespace
UnicaenLdap\Service
;
use
Interop\Container\ContainerInterface
;
use
Zend\ServiceManager\FactoryInterface
;
use
Zend\ServiceManager\ServiceLocatorInterface
;
...
...
@@ -12,17 +13,16 @@ use Zend\ServiceManager\ServiceLocatorInterface;
*/
class
StructureFactory
implements
FactoryInterface
{
/**
* Create service
*
* @param ServiceLocatorInterface $serviceLocator
* @return Structure
*/
public
function
createService
(
ServiceLocatorInterface
$serviceLocator
)
{
return
$this
->
__invoke
(
$serviceLocator
,
'?'
);
}
public
function
__invoke
(
ContainerInterface
$container
,
$requestedName
,
array
$options
=
null
)
{
$service
=
new
Structure
();
$service
->
setServiceLocator
(
$
serviceLocato
r
);
$service
->
setServiceLocator
(
$
containe
r
);
return
$service
;
}
...
...
src/UnicaenLdap/Service/SystemFactory.php
View file @
e8fe4a66
...
...
@@ -2,6 +2,7 @@
namespace
UnicaenLdap\Service
;
use
Interop\Container\ContainerInterface
;
use
Zend\ServiceManager\FactoryInterface
;
use
Zend\ServiceManager\ServiceLocatorInterface
;
...
...
@@ -12,17 +13,16 @@ use Zend\ServiceManager\ServiceLocatorInterface;
*/
class
SystemFactory
implements
FactoryInterface
{
/**
* Create service
*
* @param ServiceLocatorInterface $serviceLocator
* @return System
*/
public
function
createService
(
ServiceLocatorInterface
$serviceLocator
)
{
return
$this
->
__invoke
(
$serviceLocator
,
'?'
);
}
public
function
__invoke
(
ContainerInterface
$container
,
$requestedName
,
array
$options
=
null
)
{
$service
=
new
System
();
$service
->
setServiceLocator
(
$
serviceLocato
r
);
$service
->
setServiceLocator
(
$
containe
r
);
return
$service
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment