-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #578 from claytondaley/form-upgrades
Form Upgrades 1.x
- Loading branch information
Showing
32 changed files
with
684 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: Clayton Daley | ||
* Date: 5/6/2015 | ||
* Time: 6:40 PM | ||
*/ | ||
|
||
namespace ZfcUser\Factory; | ||
|
||
use Zend\ServiceManager\FactoryInterface; | ||
use Zend\ServiceManager\ServiceLocatorInterface; | ||
|
||
class AuthenticationService implements FactoryInterface | ||
{ | ||
|
||
/** | ||
* Create service | ||
* | ||
* @param ServiceLocatorInterface $serviceLocator | ||
* @return mixed | ||
*/ | ||
public function createService(ServiceLocatorInterface $serviceLocator) | ||
{ | ||
return new \Zend\Authentication\AuthenticationService( | ||
$serviceLocator->get('ZfcUser\Authentication\Storage\Db'), | ||
$serviceLocator->get('ZfcUser\Authentication\Adapter\AdapterChain') | ||
); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/ZfcUser/Factory/Controller/Plugin/ZfcUserAuthentication.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: Clayton Daley | ||
* Date: 5/6/2015 | ||
* Time: 6:48 PM | ||
*/ | ||
|
||
namespace ZfcUser\Factory\Controller\Plugin; | ||
|
||
use Zend\ServiceManager\FactoryInterface; | ||
use Zend\ServiceManager\ServiceLocatorInterface; | ||
use ZfcUser\Controller; | ||
|
||
class ZfcUserAuthentication implements FactoryInterface | ||
{ | ||
|
||
/** | ||
* Create service | ||
* | ||
* @param ServiceLocatorInterface $serviceManager | ||
* @return mixed | ||
*/ | ||
public function createService(ServiceLocatorInterface $serviceManager) | ||
{ | ||
$serviceLocator = $serviceManager->getServiceLocator(); | ||
$authService = $serviceLocator->get('zfcuser_auth_service'); | ||
$authAdapter = $serviceLocator->get('ZfcUser\Authentication\Adapter\AdapterChain'); | ||
$controllerPlugin = new Controller\Plugin\ZfcUserAuthentication; | ||
$controllerPlugin->setAuthService($authService); | ||
$controllerPlugin->setAuthAdapter($authAdapter); | ||
return $controllerPlugin; | ||
} | ||
} |
Oops, something went wrong.