From 8eb0fb90a516728b74ea85936612b01804f00a07 Mon Sep 17 00:00:00 2001
From: Bertrand Gauthier <bertrand.gauthier@unicaen.fr>
Date: Wed, 7 Oct 2015 11:57:05 +0000
Subject: [PATCH] Renommage namespace.

---
 Module.php                                                 | 2 +-
 composer.json                                              | 7 ++-----
 config/module.config.php                                   | 2 +-
 src/{UnicaenOAuth => UnicaenOauth}/Cas/CasService.php      | 2 +-
 .../Cas/CasServiceFactory.php                              | 2 +-
 src/{UnicaenOAuth => UnicaenOauth}/Cas/CasServiceTrait.php | 2 +-
 .../Controller/CasController.php                           | 4 ++--
 .../Controller/CasControllerFactory.php                    | 2 +-
 .../OAuth2/Adapter/StorageAdapter.php                      | 4 ++--
 .../OAuth2/Adapter/StorageAdapterFactory.php               | 6 +++---
 view/unicaen-oauth/cas/login.phtml                         | 2 +-
 11 files changed, 16 insertions(+), 19 deletions(-)
 rename src/{UnicaenOAuth => UnicaenOauth}/Cas/CasService.php (98%)
 rename src/{UnicaenOAuth => UnicaenOauth}/Cas/CasServiceFactory.php (92%)
 rename src/{UnicaenOAuth => UnicaenOauth}/Cas/CasServiceTrait.php (93%)
 rename src/{UnicaenOAuth => UnicaenOauth}/Controller/CasController.php (84%)
 rename src/{UnicaenOAuth => UnicaenOauth}/Controller/CasControllerFactory.php (92%)
 rename src/{UnicaenOAuth => UnicaenOauth}/OAuth2/Adapter/StorageAdapter.php (98%)
 rename src/{UnicaenOAuth => UnicaenOauth}/OAuth2/Adapter/StorageAdapterFactory.php (94%)

diff --git a/Module.php b/Module.php
index 7b08780..23f1317 100644
--- a/Module.php
+++ b/Module.php
@@ -1,5 +1,5 @@
 <?php
-namespace UnicaenOAuth;
+namespace UnicaenOauth;
 
 class Module
 {
diff --git a/composer.json b/composer.json
index 960186b..c6cda50 100644
--- a/composer.json
+++ b/composer.json
@@ -23,10 +23,7 @@
   },
   "autoload": {
     "psr-0": {
-      "UnicaenOAuth": "src/"
-    },
-    "classmap": [
-      "./Module.php"
-    ]
+      "UnicaenOauth": "src/"
+    }
   }
 }
diff --git a/config/module.config.php b/config/module.config.php
index de309a9..6f5333c 100644
--- a/config/module.config.php
+++ b/config/module.config.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace UnicaenOAuth;
+namespace UnicaenOauth;
 
 return array(
     'router' => array(
diff --git a/src/UnicaenOAuth/Cas/CasService.php b/src/UnicaenOauth/Cas/CasService.php
similarity index 98%
rename from src/UnicaenOAuth/Cas/CasService.php
rename to src/UnicaenOauth/Cas/CasService.php
index f0ae2fd..b1a17c4 100644
--- a/src/UnicaenOAuth/Cas/CasService.php
+++ b/src/UnicaenOauth/Cas/CasService.php
@@ -1,5 +1,5 @@
 <?php
-namespace UnicaenOAuth\Cas;
+namespace UnicaenOauth\Cas;
 
 use Zend\ServiceManager\ServiceLocatorAwareInterface;
 use Zend\ServiceManager\ServiceLocatorAwareTrait;
diff --git a/src/UnicaenOAuth/Cas/CasServiceFactory.php b/src/UnicaenOauth/Cas/CasServiceFactory.php
similarity index 92%
rename from src/UnicaenOAuth/Cas/CasServiceFactory.php
rename to src/UnicaenOauth/Cas/CasServiceFactory.php
index 2daf60e..58d4859 100644
--- a/src/UnicaenOAuth/Cas/CasServiceFactory.php
+++ b/src/UnicaenOauth/Cas/CasServiceFactory.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace UnicaenOAuth\Cas;
+namespace UnicaenOauth\Cas;
 
 use Zend\ServiceManager\FactoryInterface;
 use Zend\ServiceManager\ServiceLocatorInterface;
diff --git a/src/UnicaenOAuth/Cas/CasServiceTrait.php b/src/UnicaenOauth/Cas/CasServiceTrait.php
similarity index 93%
rename from src/UnicaenOAuth/Cas/CasServiceTrait.php
rename to src/UnicaenOauth/Cas/CasServiceTrait.php
index 5589ef7..3ca0f22 100644
--- a/src/UnicaenOAuth/Cas/CasServiceTrait.php
+++ b/src/UnicaenOauth/Cas/CasServiceTrait.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace UnicaenOAuth\Cas;
+namespace UnicaenOauth\Cas;
 
 trait CasServiceTrait
 {
diff --git a/src/UnicaenOAuth/Controller/CasController.php b/src/UnicaenOauth/Controller/CasController.php
similarity index 84%
rename from src/UnicaenOAuth/Controller/CasController.php
rename to src/UnicaenOauth/Controller/CasController.php
index 6ab8476..b7c8492 100644
--- a/src/UnicaenOAuth/Controller/CasController.php
+++ b/src/UnicaenOauth/Controller/CasController.php
@@ -1,8 +1,8 @@
 <?php
 
-namespace UnicaenOAuth\Controller;
+namespace UnicaenOauth\Controller;
 
-use UnicaenOAuth\Cas\CasServiceTrait;
+use UnicaenOauth\Cas\CasServiceTrait;
 use Zend\Mvc\Controller\AbstractActionController;
 
 class CasController extends AbstractActionController
diff --git a/src/UnicaenOAuth/Controller/CasControllerFactory.php b/src/UnicaenOauth/Controller/CasControllerFactory.php
similarity index 92%
rename from src/UnicaenOAuth/Controller/CasControllerFactory.php
rename to src/UnicaenOauth/Controller/CasControllerFactory.php
index 625fa74..2d37ea9 100644
--- a/src/UnicaenOAuth/Controller/CasControllerFactory.php
+++ b/src/UnicaenOauth/Controller/CasControllerFactory.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace UnicaenOAuth\Controller;
+namespace UnicaenOauth\Controller;
 
 use Zend\ServiceManager\FactoryInterface;
 use Zend\ServiceManager\ServiceLocatorInterface;
diff --git a/src/UnicaenOAuth/OAuth2/Adapter/StorageAdapter.php b/src/UnicaenOauth/OAuth2/Adapter/StorageAdapter.php
similarity index 98%
rename from src/UnicaenOAuth/OAuth2/Adapter/StorageAdapter.php
rename to src/UnicaenOauth/OAuth2/Adapter/StorageAdapter.php
index a5a932c..86e9d7d 100644
--- a/src/UnicaenOAuth/OAuth2/Adapter/StorageAdapter.php
+++ b/src/UnicaenOauth/OAuth2/Adapter/StorageAdapter.php
@@ -1,8 +1,8 @@
 <?php
 
-namespace UnicaenOAuth\OAuth2\Adapter;
+namespace UnicaenOauth\OAuth2\Adapter;
 
-use UnicaenOAuth\Cas\CasServiceTrait;
+use UnicaenOauth\Cas\CasServiceTrait;
 use UnicaenLdap\Filter\People as PeopleFilter;
 use UnicaenLdap\Service\People as PeopleLdapService;
 use Zend\Authentication\Adapter\Ldap as LdapAuthAdapter;
diff --git a/src/UnicaenOAuth/OAuth2/Adapter/StorageAdapterFactory.php b/src/UnicaenOauth/OAuth2/Adapter/StorageAdapterFactory.php
similarity index 94%
rename from src/UnicaenOAuth/OAuth2/Adapter/StorageAdapterFactory.php
rename to src/UnicaenOauth/OAuth2/Adapter/StorageAdapterFactory.php
index eac1f53..576353b 100644
--- a/src/UnicaenOAuth/OAuth2/Adapter/StorageAdapterFactory.php
+++ b/src/UnicaenOauth/OAuth2/Adapter/StorageAdapterFactory.php
@@ -1,8 +1,8 @@
 <?php
 
-namespace UnicaenOAuth\OAuth2\Adapter;
+namespace UnicaenOauth\OAuth2\Adapter;
 
-use UnicaenOAuth\Cas\CasService;
+use UnicaenOauth\Cas\CasService;
 use Zend\ServiceManager\FactoryInterface;
 use Zend\ServiceManager\ServiceLocatorInterface;
 use ZF\OAuth2\Controller\Exception;
@@ -12,7 +12,7 @@ class StorageAdapterFactory implements FactoryInterface
     /**
      * @param ServiceLocatorInterface $services
      * @throws \ZF\OAuth2\Controller\Exception\RuntimeException
-     * @return \UnicaenOAuth\OAuth2\Adapter\PdoAdapter
+     * @return \UnicaenOauth\OAuth2\Adapter\PdoAdapter
      */
     public function createService(ServiceLocatorInterface $services)
     {
diff --git a/view/unicaen-oauth/cas/login.phtml b/view/unicaen-oauth/cas/login.phtml
index 215dd7c..91557b8 100644
--- a/view/unicaen-oauth/cas/login.phtml
+++ b/view/unicaen-oauth/cas/login.phtml
@@ -8,7 +8,7 @@
 <script type="text/javascript">
     $(function () {
         var username = '<?php echo $username ?>';
-        var passwordCasPrefix = '<?php echo \UnicaenOAuth\OAuth2\Adapter\StorageAdapter::PASSWORD_CAS_PREFIX ?>';
+        var passwordCasPrefix = '<?php echo \UnicaenOauth\OAuth2\Adapter\StorageAdapter::PASSWORD_CAS_PREFIX ?>';
         try {
             window.opener.app.authenticationWithCasComplete({
                 identification: username,
-- 
GitLab