Skip to content

Commit

Permalink
Use ServiceManager
Browse files Browse the repository at this point in the history
  • Loading branch information
gossi committed Dec 22, 2014
1 parent c382c11 commit 1fc0082
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 21 deletions.
35 changes: 18 additions & 17 deletions .buildpath
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
<buildpathentry kind="src" path="vendor/symfony/finder"/>
<buildpathentry kind="src" path="vendor/seld/jsonlint/src"/>
<buildpathentry kind="src" path="vendor/twig/twig/lib"/>
<buildpathentry kind="src" path="core/src"/>
<buildpathentry kind="src" path="vendor/symfony/translation"/>
<buildpathentry excluding="Symfony/Component/HttpFoundation/Resources/stubs/" kind="src" path="vendor/symfony/http-foundation"/>
<buildpathentry excluding="composer/" kind="src" path="vendor/composer"/>
<buildpathentry kind="src" path="vendor/symfony/config"/>
<buildpathentry kind="src" path="vendor/psr/log"/>
<buildpathentry kind="src" path="vendor/symfony/filesystem"/>
<buildpathentry kind="src" path="vendor/propel/propel/src"/>
<buildpathentry kind="src" path="src"/>
<buildpathentry kind="src" path="vendor/composer/composer/src"/>
<buildpathentry kind="src" path="vendor/symfony/yaml"/>
<buildpathentry kind="src" path="vendor/symfony/routing"/>
<buildpathentry kind="src" path="vendor/composer/composer/src"/>
<buildpathentry kind="src" path="core/database"/>
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
<buildpathentry excluding="Symfony/Component/HttpFoundation/Resources/stubs/" kind="src" path="vendor/symfony/http-foundation"/>
<buildpathentry excluding="composer/" kind="src" path="vendor/composer"/>
<buildpathentry kind="src" path="vendor/twig/twig/lib"/>
<buildpathentry kind="src" path="vendor/seld/jsonlint/src"/>
<buildpathentry kind="src" path="vendor/symfony/translation"/>
<buildpathentry kind="src" path="vendor/keeko/composer-installer/src"/>
<buildpathentry kind="src" path="vendor/symfony/validator"/>
<buildpathentry kind="src" path="vendor/symfony/console"/>
<buildpathentry kind="src" path="src"/>
<buildpathentry kind="src" path="vendor/justinrainbow/json-schema/src"/>
<buildpathentry kind="src" path="vendor/symfony/process"/>
<buildpathentry kind="src" path="vendor/symfony/options-resolver"/>
<buildpathentry kind="src" path="vendor/symfony/process"/>
<buildpathentry kind="src" path="vendor/propel/propel/src"/>
<buildpathentry kind="src" path="vendor/symfony/filesystem"/>
<buildpathentry kind="src" path="vendor/keeko/composer-installer/src"/>
<buildpathentry kind="src" path="vendor/psr/log"/>
<buildpathentry kind="src" path="vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Resources/stubs"/>
<buildpathentry kind="src" path="vendor/symfony/console"/>
<buildpathentry kind="src" path="core/src"/>
<buildpathentry kind="src" path="vendor/symfony/finder"/>
<buildpathentry kind="src" path="vendor/symfony/yaml"/>
<buildpathentry kind="src" path="vendor/symfony/validator"/>
</buildpath>
2 changes: 1 addition & 1 deletion .settings/org.eclipse.wst.validation.prefs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
disabled=06vendor111core/vendor
disabled=113core/database06vendor111core/vendor
eclipse.preferences.version=1
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@
"login" : {
"class" : "keeko\\auth\\action\\LoginAction",
"title" : "Login",
"acl": ["guest"],
"response" : {
"json" : "keeko\\auth\\response\\LoginJsonResponse"
}
},
"logout" : {
"class" : "keeko\\auth\\action\\LogoutAction",
"title" : "Logout",
"acl": ["user"],
"response" : {
"json" : "keeko\\auth\\response\\LogoutJsonResponse"
}
Expand Down Expand Up @@ -76,7 +78,7 @@
"method" : "GET",
"summary" : "Logout",
"nickname" : "logout",
"type": "LogoutResponse"
"type" : "LogoutResponse"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/action/LoginAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected function setDefaultParams(OptionsResolverInterface $resolver) {
*/
public function run(Request $request)
{
$authManager = $this->getModule()->getApplication()->getAuthManager();
$authManager = $this->getServiceContainer()->getAuthManager();
if ($authManager->login($this->getParam('username'), $this->getParam('password'))) {
$auth = $authManager->getAuth();
$this->response->setData([
Expand Down
2 changes: 1 addition & 1 deletion src/action/LogoutAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class LogoutAction extends AbstractAction
*/
public function run(Request $request)
{
$authManager = $this->getModule()->getApplication()->getAuthManager();
$authManager = $this->getServiceContainer()->getAuthManager();
$success = $authManager->logout();
$this->response->setData(['success' => $success]);
return $this->response->run($request);
Expand Down

0 comments on commit 1fc0082

Please sign in to comment.