aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2015-03-23 08:54:42 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2015-03-23 08:54:42 +0100
commit01e36d8e1bf6b93c92f1067652ae0d69daf9c30b (patch)
treec578734a0f63ade2b11fea3e8ae124a7d40c7f90
parentbd6b8110866a4ea34775b4cba222bd483a24b44b (diff)
downloadStream-01e36d8e1bf6b93c92f1067652ae0d69daf9c30b.zip
Stream-01e36d8e1bf6b93c92f1067652ae0d69daf9c30b.tar.gz
Stream-01e36d8e1bf6b93c92f1067652ae0d69daf9c30b.tar.bz2
Remove from/import and drop PHP5.3.
-rw-r--r--Bucket.php15
-rw-r--r--Composite.php4
-rw-r--r--Context.php17
-rw-r--r--Exception.php8
-rw-r--r--Filter/Basic.php24
-rw-r--r--Filter/Exception.php17
-rw-r--r--Filter/Filter.php35
-rw-r--r--Filter/LateComputed.php23
-rw-r--r--IStream/Bufferable.php4
-rw-r--r--IStream/In.php4
-rw-r--r--IStream/Lockable.php4
-rw-r--r--IStream/Out.php4
-rw-r--r--IStream/Pathable.php4
-rw-r--r--IStream/Pointable.php4
-rw-r--r--IStream/Statable.php4
-rw-r--r--IStream/Structural.php4
-rw-r--r--IStream/Touchable.php4
-rw-r--r--Stream.php80
-rw-r--r--Wrapper/Exception.php17
-rw-r--r--Wrapper/IWrapper/File.php4
-rw-r--r--Wrapper/IWrapper/IWrapper.php26
-rw-r--r--Wrapper/IWrapper/Stream.php4
-rw-r--r--Wrapper/Wrapper.php26
23 files changed, 79 insertions, 257 deletions
diff --git a/Bucket.php b/Bucket.php
index ff0604e..00d366a 100644
--- a/Bucket.php
+++ b/Bucket.php
@@ -34,18 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace {
-
-from('Hoa')
-
-/**
- * \Hoa\Stream\Exception
- */
--> import('Stream.Exception');
-
-}
-
-namespace Hoa\Stream {
+namespace Hoa\Stream;
/**
* Class \Hoa\Stream\Bucket.
@@ -291,5 +280,3 @@ class Bucket {
return $this->_bucket;
}
}
-
-}
diff --git a/Composite.php b/Composite.php
index 4b5e73f..9d6d87d 100644
--- a/Composite.php
+++ b/Composite.php
@@ -34,7 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace Hoa\Stream {
+namespace Hoa\Stream;
/**
* Class \Hoa\Stream\Composite.
@@ -116,5 +116,3 @@ abstract class Composite {
return $this->_innerStream;
}
}
-
-}
diff --git a/Context.php b/Context.php
index d324d6b..bbf93cd 100644
--- a/Context.php
+++ b/Context.php
@@ -34,18 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace {
-
-from('Hoa')
-
-/**
- * \Hoa\Stream\Exception
- */
--> import('Stream.Exception');
-
-}
-
-namespace Hoa\Stream {
+namespace Hoa\Stream;
/**
* Class \Hoa\Stream\Context.
@@ -71,7 +60,7 @@ class Context {
*
* @var \Hoa\Stream\Context array
*/
- protected static $_instances = array();
+ protected static $_instances = [];
@@ -191,5 +180,3 @@ class Context {
return $this->_context;
}
}
-
-}
diff --git a/Exception.php b/Exception.php
index cca727c..99607da 100644
--- a/Exception.php
+++ b/Exception.php
@@ -34,7 +34,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace Hoa\Stream {
+namespace Hoa\Stream;
+
+use Hoa\Core;
/**
* Class \Hoa\Stream\Exception.
@@ -46,6 +48,4 @@ namespace Hoa\Stream {
* @license New BSD License
*/
-class Exception extends \Hoa\Core\Exception { }
-
-}
+class Exception extends Core\Exception { }
diff --git a/Filter/Basic.php b/Filter/Basic.php
index 9d312f3..6412801 100644
--- a/Filter/Basic.php
+++ b/Filter/Basic.php
@@ -34,23 +34,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace {
+namespace Hoa\Stream\Filter;
-from('Hoa')
-
-/**
- * \Hoa\Stream\Filter\Exception
- */
--> import('Stream.Filter.Exception')
-
-/**
- * \Hoa\Stream\Bucket
- */
--> import('Stream.Bucket');
-
-}
-
-namespace Hoa\Stream\Filter {
+use Hoa\Stream;
/**
* Class \Hoa\Stream\Filter\Basic.
@@ -135,8 +121,8 @@ abstract class Basic extends \php_user_filter {
*/
public function filter ( $in, $out, &$consumed, $closing ) {
- $iBucket = new \Hoa\Stream\Bucket($in);
- $oBucket = new \Hoa\Stream\Bucket($out);
+ $iBucket = new Stream\Bucket($in);
+ $oBucket = new Stream\Bucket($out);
while(false === $iBucket->eob()) {
@@ -238,5 +224,3 @@ abstract class Basic extends \php_user_filter {
return $this->stream;
}
}
-
-}
diff --git a/Filter/Exception.php b/Filter/Exception.php
index 27b7d96..346f37f 100644
--- a/Filter/Exception.php
+++ b/Filter/Exception.php
@@ -34,18 +34,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace {
+namespace Hoa\Stream\Filter;
-from('Hoa')
-
-/**
- * \Hoa\Stream\Exception
- */
--> import('Stream.Exception');
-
-}
-
-namespace Hoa\Stream\Filter {
+use Hoa\Stream;
/**
* Class \Hoa\Stream\Filter\Exception.
@@ -57,6 +48,4 @@ namespace Hoa\Stream\Filter {
* @license New BSD License
*/
-class Exception extends \Hoa\Stream\Exception { }
-
-}
+class Exception extends Stream\Exception { }
diff --git a/Filter/Filter.php b/Filter/Filter.php
index 786cfa5..3bfb943 100644
--- a/Filter/Filter.php
+++ b/Filter/Filter.php
@@ -34,23 +34,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace {
+namespace Hoa\Stream\Filter;
-from('Hoa')
-
-/**
- * \Hoa\Stream\Filter\Exception
- */
--> import('Stream.Filter.Exception')
-
-/**
- * \Hoa\Stream
- */
--> import('Stream.~');
-
-}
-
-namespace Hoa\Stream\Filter {
+use Hoa\Core;
+use Hoa\Stream;
/**
* Class \Hoa\Stream\Filter.
@@ -62,7 +49,7 @@ namespace Hoa\Stream\Filter {
* @license New BSD License
*/
-abstract class Filter extends \Hoa\Stream {
+abstract class Filter extends Stream {
/**
* Overwrite filter if already exists.
@@ -104,7 +91,7 @@ abstract class Filter extends \Hoa\Stream {
*
* @var \Hoa\Stream\Filter array
*/
- protected static $_resources = array();
+ protected static $_resources = [];
@@ -154,7 +141,7 @@ abstract class Filter extends \Hoa\Stream {
public static function append ( $stream, $name,
$mode = self::READ, $parameters = null ) {
- if($stream instanceof \Hoa\Stream)
+ if($stream instanceof Stream)
$stream = $stream->getStream();
if(null === $parameters)
@@ -188,7 +175,7 @@ abstract class Filter extends \Hoa\Stream {
public static function prepend ( $stream, $name,
$mode = self::READ, $parameters = null ) {
- if($stream instanceof \Hoa\Stream)
+ if($stream instanceof Stream)
$stream = $stream->getStream();
if(null === $parameters)
@@ -251,13 +238,7 @@ abstract class Filter extends \Hoa\Stream {
}
}
-}
-
-namespace {
-
/**
* Flex entity.
*/
-Hoa\Core\Consistency::flexEntity('Hoa\Stream\Filter\Filter');
-
-}
+Core\Consistency::flexEntity('Hoa\Stream\Filter\Filter');
diff --git a/Filter/LateComputed.php b/Filter/LateComputed.php
index e3eb98e..0b9bf79 100644
--- a/Filter/LateComputed.php
+++ b/Filter/LateComputed.php
@@ -34,18 +34,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace {
+namespace Hoa\Stream\Filter;
-from('Hoa')
-
-/**
- * \Hoa\Stream\Filter\Basic
- */
--> import('Stream.Filter.Basic');
-
-}
-
-namespace Hoa\Stream\Filter {
+use Hoa\Stream;
/**
* Class \Hoa\Stream\Filter\LateComputed.
@@ -93,7 +84,7 @@ abstract class LateComputed extends Basic {
public function filter ( $in, $out, &$consumed, $closing ) {
$return = self::FEED_ME;
- $iBucket = new \Hoa\Stream\Bucket($in);
+ $iBucket = new Stream\Bucket($in);
while(false === $iBucket->eob()) {
@@ -108,12 +99,12 @@ abstract class LateComputed extends Basic {
$stream = $this->getStream();
$this->compute();
- $bucket = new \Hoa\Stream\Bucket(
+ $bucket = new Stream\Bucket(
$stream,
- \Hoa\Stream\Bucket::IS_A_STREAM,
+ Stream\Bucket::IS_A_STREAM,
$this->_buffer
);
- $oBucket = new \Hoa\Stream\Bucket($out);
+ $oBucket = new Stream\Bucket($out);
$oBucket->append($bucket);
$return = self::PASS_ON;
@@ -131,5 +122,3 @@ abstract class LateComputed extends Basic {
*/
abstract protected function compute ( );
}
-
-}
diff --git a/IStream/Bufferable.php b/IStream/Bufferable.php
index 9314164..3732022 100644
--- a/IStream/Bufferable.php
+++ b/IStream/Bufferable.php
@@ -34,7 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace Hoa\Stream\IStream {
+namespace Hoa\Stream\IStream;
/**
* Interface \Hoa\Stream\IStream\Bufferable.
@@ -93,5 +93,3 @@ interface Bufferable {
*/
public function getBufferSize ( );
}
-
-}
diff --git a/IStream/In.php b/IStream/In.php
index a76ccd2..21ce3a7 100644
--- a/IStream/In.php
+++ b/IStream/In.php
@@ -34,7 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace Hoa\Stream\IStream {
+namespace Hoa\Stream\IStream;
/**
* Interface \Hoa\Stream\IStream\In.
@@ -146,5 +146,3 @@ interface In {
*/
public function scanf ( $format );
}
-
-}
diff --git a/IStream/Lockable.php b/IStream/Lockable.php
index b90a71c..4e2e2d3 100644
--- a/IStream/Lockable.php
+++ b/IStream/Lockable.php
@@ -34,7 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace Hoa\Stream\IStream {
+namespace Hoa\Stream\IStream;
/**
* Interface \Hoa\Stream\IStream\Lockable.
@@ -88,5 +88,3 @@ interface Lockable {
*/
public function lock ( $operation );
}
-
-}
diff --git a/IStream/Out.php b/IStream/Out.php
index 51b38f2..380a27f 100644
--- a/IStream/Out.php
+++ b/IStream/Out.php
@@ -34,7 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace Hoa\Stream\IStream {
+namespace Hoa\Stream\IStream;
/**
* Interface \Hoa\Stream\IStream\Out.
@@ -139,5 +139,3 @@ interface Out {
*/
public function truncate ( $size );
}
-
-}
diff --git a/IStream/Pathable.php b/IStream/Pathable.php
index b2d6d92..f638683 100644
--- a/IStream/Pathable.php
+++ b/IStream/Pathable.php
@@ -34,7 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace Hoa\Stream\IStream {
+namespace Hoa\Stream\IStream;
/**
* Interface \Hoa\Stream\IStream\Pathable.
@@ -64,5 +64,3 @@ interface Pathable {
*/
public function getDirname ( );
}
-
-}
diff --git a/IStream/Pointable.php b/IStream/Pointable.php
index bece1be..b2a7e90 100644
--- a/IStream/Pointable.php
+++ b/IStream/Pointable.php
@@ -34,7 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace Hoa\Stream\IStream {
+namespace Hoa\Stream\IStream;
/**
* Interface \Hoa\Stream\IStream\Pointable.
@@ -97,5 +97,3 @@ interface Pointable {
*/
public function tell ( );
}
-
-}
diff --git a/IStream/Statable.php b/IStream/Statable.php
index 3a74fa6..bac6299 100644
--- a/IStream/Statable.php
+++ b/IStream/Statable.php
@@ -34,7 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace Hoa\Stream\IStream {
+namespace Hoa\Stream\IStream;
/**
* Interface \Hoa\Stream\IStream\Statable.
@@ -159,5 +159,3 @@ interface Statable {
*/
public static function clearAllStatisticCaches ( );
}
-
-}
diff --git a/IStream/Structural.php b/IStream/Structural.php
index 54fe160..f2d0a92 100644
--- a/IStream/Structural.php
+++ b/IStream/Structural.php
@@ -34,7 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace Hoa\Stream\IStream {
+namespace Hoa\Stream\IStream;
/**
* Interface \Hoa\Stream\IStream\Structural.
@@ -127,5 +127,3 @@ interface Structural {
*/
public function querySelectorAll ( $query );
}
-
-}
diff --git a/IStream/Touchable.php b/IStream/Touchable.php
index fa95b2d..f3bf869 100644
--- a/IStream/Touchable.php
+++ b/IStream/Touchable.php
@@ -34,7 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace Hoa\Stream\IStream {
+namespace Hoa\Stream\IStream;
/**
* Interface \Hoa\Stream\IStream\Touchable.
@@ -161,5 +161,3 @@ interface Touchable {
*/
public static function umask ( $umask = null );
}
-
-}
diff --git a/Stream.php b/Stream.php
index a87064e..0a97202 100644
--- a/Stream.php
+++ b/Stream.php
@@ -34,23 +34,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace {
+namespace Hoa\Stream;
-from('Hoa')
-
-/**
- * \Hoa\Stream\Exception
- */
--> import('Stream.Exception')
-
-/**
- * \Hoa\Stream\Context
- */
--> import('Stream.Context');
-
-}
-
-namespace Hoa\Stream {
+use Hoa\Core;
/**
* Class \Hoa\Stream.
@@ -62,7 +48,7 @@ namespace Hoa\Stream {
* @license New BSD License
*/
-abstract class Stream implements \Hoa\Core\Event\Listenable {
+abstract class Stream implements Core\Event\Listenable {
/**
* Name index in the stream bucket.
@@ -97,14 +83,14 @@ abstract class Stream implements \Hoa\Core\Event\Listenable {
*
* @var \Hoa\Stream array
*/
- protected $_bucket = array();
+ protected $_bucket = [];
/**
* Static stream register.
*
* @var \Hoa\Stream array
*/
- private static $_register = array();
+ private static $_register = [];
/**
* Buffer size (default is 8Ko).
@@ -167,7 +153,7 @@ abstract class Stream implements \Hoa\Core\Event\Listenable {
$this->_streamName = $streamName;
$this->_context = $context;
$this->_hasBeenDiffered = $wait;
- $this->_on = new \Hoa\Core\Event\Listener($this, array(
+ $this->_on = new Core\Event\Listener($this, [
'authrequire',
'authresult',
'complete',
@@ -178,7 +164,7 @@ abstract class Stream implements \Hoa\Core\Event\Listenable {
'redirect',
'resolve',
'size'
- ));
+ ]);
if(true === $wait)
return;
@@ -219,18 +205,18 @@ abstract class Stream implements \Hoa\Core\Event\Listenable {
if(!isset(self::$_register[$name])) {
- self::$_register[$name] = array(
+ self::$_register[$name] = [
self::NAME => $streamName,
self::HANDLER => $handler,
self::RESOURCE => $handler->_open($streamName, $context),
self::CONTEXT => $context
- );
- \Hoa\Core\Event::register(
+ ];
+ Core\Event::register(
'hoa://Event/Stream/' . $streamName,
$handler
);
// Add :open-ready?
- \Hoa\Core\Event::register(
+ Core\Event::register(
'hoa://Event/Stream/' . $streamName . ':close-before',
$handler
);
@@ -284,9 +270,9 @@ abstract class Stream implements \Hoa\Core\Event\Listenable {
if(null === $context) {
$handle = Context::getInstance(uniqid());
- $handle->setParameters(array(
- 'notification' => array($this, '_notify')
- ));
+ $handle->setParameters([
+ 'notification' => [$this, '_notify']
+ ]);
$context = $handle->getId();
}
elseif(true === Context::contextExists($context)) {
@@ -295,9 +281,9 @@ abstract class Stream implements \Hoa\Core\Event\Listenable {
$parameters = $handle->getParameters();
if(!isset($parameters['notification']))
- $handle->setParameters(array(
- 'notification' => array($this, '_notify')
- ));
+ $handle->setParameters([
+ 'notification' => [$this, '_notify']
+ ]);
}
}
@@ -324,10 +310,10 @@ abstract class Stream implements \Hoa\Core\Event\Listenable {
if(!isset(self::$_register[$name]))
return;
- \Hoa\Core\Event::notify(
+ Core\Event::notify(
'hoa://Event/Stream/' . $streamName . ':close-before',
$this,
- new \Hoa\Core\Event\Bucket()
+ new Core\Event\Bucket()
);
if(false === $this->_close())
@@ -336,10 +322,10 @@ abstract class Stream implements \Hoa\Core\Event\Listenable {
unset(self::$_register[$name]);
$this->_bucket[self::HANDLER] = null;
unset($this->_on);
- \Hoa\Core\Event::unregister(
+ Core\Event::unregister(
'hoa://Event/Stream/' . $streamName
);
- \Hoa\Core\Event::unregister(
+ Core\Event::unregister(
'hoa://Event/Stream/' . $streamName . ':close-before'
);
@@ -585,7 +571,7 @@ abstract class Stream implements \Hoa\Core\Event\Listenable {
public function _notify ( $ncode, $severity, $message, $code, $transferred,
$max ) {
- static $_map = array(
+ static $_map = [
STREAM_NOTIFY_AUTH_REQUIRED => 'authrequire',
STREAM_NOTIFY_AUTH_RESULT => 'authresult',
STREAM_NOTIFY_COMPLETED => 'complete',
@@ -596,16 +582,16 @@ abstract class Stream implements \Hoa\Core\Event\Listenable {
STREAM_NOTIFY_REDIRECTED => 'redirect',
STREAM_NOTIFY_RESOLVE => 'resolve',
STREAM_NOTIFY_FILE_SIZE_IS => 'size'
- );
+ ];
- $this->_on->fire($_map[$ncode], new \Hoa\Core\Event\Bucket(array(
+ $this->_on->fire($_map[$ncode], new Core\Event\Bucket([
'code' => $code,
'severity' => $severity,
'message' => $message,
'code' => $code,
'transferred' => $transferred,
'max' => $max
- )));
+ ]));
return;
}
@@ -663,7 +649,7 @@ abstract class Stream implements \Hoa\Core\Event\Listenable {
* @license New BSD License
*/
-class _Protocol extends \Hoa\Core\Protocol {
+class _Protocol extends Core\Protocol {
/**
* Component's name.
@@ -687,25 +673,19 @@ class _Protocol extends \Hoa\Core\Protocol {
}
}
-}
-
-namespace {
-
/**
* Flex entity.
*/
-Hoa\Core\Consistency::flexEntity('Hoa\Stream\Stream');
+Core\Consistency::flexEntity('Hoa\Stream\Stream');
/**
* Shutdown method.
*/
-Hoa\Core::registerShutdownFunction('\Hoa\Stream\Stream', '_Hoa_Stream');
+Core::registerShutdownFunction('\Hoa\Stream\Stream', '_Hoa_Stream');
/**
* Add the hoa://Library/Stream component. Should be use to reach/get an entry
* in the \Hoa\Stream register.
*/
-$protocol = Hoa\Core::getInstance()->getProtocol();
-$protocol['Library'][] = new Hoa\Stream\_Protocol();
-
-}
+$protocol = Core::getInstance()->getProtocol();
+$protocol['Library'][] = new _Protocol();
diff --git a/Wrapper/Exception.php b/Wrapper/Exception.php
index 670c3e2..8e09dd9 100644
--- a/Wrapper/Exception.php
+++ b/Wrapper/Exception.php
@@ -34,18 +34,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace {
+namespace Hoa\Stream\Wrapper;
-from('Hoa')
-
-/**
- * \Hoa\Stream\Exception
- */
--> import('Stream.Exception');
-
-}
-
-namespace Hoa\Stream\Wrapper {
+use Hoa\Stream;
/**
* Class \Hoa\Stream\Wrapper\Exception.
@@ -57,6 +48,4 @@ namespace Hoa\Stream\Wrapper {
* @license New BSD License
*/
-class Exception extends \Hoa\Stream\Exception { }
-
-}
+class Exception extends Stream\Exception { }
diff --git a/Wrapper/IWrapper/File.php b/Wrapper/IWrapper/File.php
index d565425..ddbb585 100644
--- a/Wrapper/IWrapper/File.php
+++ b/Wrapper/IWrapper/File.php
@@ -34,7 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace Hoa\Stream\Wrapper\IWrapper {
+namespace Hoa\Stream\Wrapper\IWrapper;
/**
* Interface \Hoa\Stream\Wrapper\IWrapper\File.
@@ -163,5 +163,3 @@ interface File {
*/
public function url_stat ( $path, $flags );
}
-
-}
diff --git a/Wrapper/IWrapper/IWrapper.php b/Wrapper/IWrapper/IWrapper.php
index 0529f21..e97476e 100644
--- a/Wrapper/IWrapper/IWrapper.php
+++ b/Wrapper/IWrapper/IWrapper.php
@@ -34,23 +34,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace {
+namespace Hoa\Stream\Wrapper\IWrapper;
-from('Hoa')
-
-/**
- * \Hoa\Stream\Wrapper\IWrapper\File
- */
--> import('Stream.Wrapper.I~.File')
-
-/**
- * \Hoa\Stream\Wrapper\IWrapper\Stream
- */
--> import('Stream.Wrapper.I~.Stream');
-
-}
-
-namespace Hoa\Stream\Wrapper\IWrapper {
+use Hoa\Core;
/**
* Interface \Hoa\Stream\Wrapper\IWrapper.
@@ -74,13 +60,7 @@ interface IWrapper extends File, Stream {
public function __construct ( );
}
-}
-
-namespace {
-
/**
* Flex entity.
*/
-Hoa\Core\Consistency::flexEntity('Hoa\Stream\Wrapper\IWrapper\IWrapper');
-
-}
+Core\Consistency::flexEntity('Hoa\Stream\Wrapper\IWrapper\IWrapper');
diff --git a/Wrapper/IWrapper/Stream.php b/Wrapper/IWrapper/Stream.php
index 487a81d..215abdf 100644
--- a/Wrapper/IWrapper/Stream.php
+++ b/Wrapper/IWrapper/Stream.php
@@ -34,7 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace Hoa\Stream\Wrapper\IWrapper {
+namespace Hoa\Stream\Wrapper\IWrapper;
/**
* Interface \Hoa\Stream\Wrapper\IWrapper\Stream.
@@ -240,5 +240,3 @@ interface Stream {
*/
public function stream_write ( $data );
}
-
-}
diff --git a/Wrapper/Wrapper.php b/Wrapper/Wrapper.php
index 7c0e615..4980c29 100644
--- a/Wrapper/Wrapper.php
+++ b/Wrapper/Wrapper.php
@@ -34,23 +34,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-namespace {
+namespace Hoa\Stream\Wrapper;
-from('Hoa')
-
-/**
- * \Hoa\Stream\Wrapper\Exception
- */
--> import('Stream.Wrapper.Exception')
-
-/**
- * \Hoa\Stream\Wrapper\IWrapper
- */
--> import('Stream.Wrapper.I~.~');
-
-}
-
-namespace Hoa\Stream\Wrapper {
+use Hoa\Core;
/**
* Class \Hoa\Stream\Wrapper.
@@ -137,13 +123,7 @@ class Wrapper {
}
}
-}
-
-namespace {
-
/**
* Flex entity.
*/
-Hoa\Core\Consistency::flexEntity('Hoa\Stream\Wrapper\Wrapper');
-
-}
+Core\Consistency::flexEntity('Hoa\Stream\Wrapper\Wrapper');