aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2014-11-13 21:09:24 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2014-11-13 21:14:56 +0100
commit34ca721f92cfa6164422c8cb126d457d3b5360bc (patch)
tree71c092f5417c47c9d055eca4bfb3189ca9290dac
parent6cf24b096274d1e53909823bc6d84c98e0bdca17 (diff)
downloadRegistry-34ca721f92cfa6164422c8cb126d457d3b5360bc.zip
Registry-34ca721f92cfa6164422c8cb126d457d3b5360bc.tar.gz
Registry-34ca721f92cfa6164422c8cb126d457d3b5360bc.tar.bz2
Remove from/import and update to PHP5.4.
-rw-r--r--Exception.php8
-rw-r--r--Registry.php27
2 files changed, 10 insertions, 25 deletions
diff --git a/Exception.php b/Exception.php
index fdcbe4a..055b6c3 100644
--- a/Exception.php
+++ b/Exception.php
@@ -34,7 +34,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace Hoa\Registry {
+namespace Hoa\Registry;
+
+use Hoa\Core;
/**
* Class \Hoa\Registry\Exception.
@@ -46,6 +48,4 @@ namespace Hoa\Registry {
* @license New BSD License
*/
-class Exception extends \Hoa\Core\Exception { }
-
-}
+class Exception extends Core\Exception { }
diff --git a/Registry.php b/Registry.php
index 48f1a12..85f6f98 100644
--- a/Registry.php
+++ b/Registry.php
@@ -34,18 +34,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace {
+namespace Hoa\Registry;
-from('Hoa')
-
-/**
- * \Hoa\Registry\Exception
- */
--> import('Registry.Exception');
-
-}
-
-namespace Hoa\Registry {
+use Hoa\Core;
/**
* Class \Hoa\Registry.
@@ -169,7 +160,7 @@ class Registry extends \ArrayObject {
* @license New BSD License
*/
-class _Protocol extends \Hoa\Core\Protocol {
+class _Protocol extends Core\Protocol {
/**
* Component's name.
@@ -193,20 +184,14 @@ class _Protocol extends \Hoa\Core\Protocol {
}
}
-}
-
-namespace {
-
/**
* Flex entity.
*/
-Hoa\Core\Consistency::flexEntity('Hoa\Registry\Registry');
+Core\Consistency::flexEntity('Hoa\Registry\Registry');
/**
* Add the hoa://Library/Registry component. Should be use to reach/get an entry
* in the \Hoa\Registry, e.g.: resolve('hoa://Library/Registry#AnID').
*/
-$protocol = Hoa\Core::getInstance()->getProtocol();
-$protocol['Library'][] = new Hoa\Registry\_Protocol();
-
-}
+$protocol = Core::getInstance()->getProtocol();
+$protocol['Library'][] = new _Protocol();