diff options
author | Ivan Enderlin <ivan.enderlin@hoa-project.net> | 2014-09-17 18:50:49 +0200 |
---|---|---|
committer | Ivan Enderlin <ivan.enderlin@hoa-project.net> | 2014-09-17 18:50:49 +0200 |
commit | 6775f986a757b29e598925846cb862c59cffdc62 (patch) | |
tree | d2c10725d4e1b0b71a36b4529452b8a003454739 | |
parent | 3aee0f2a4385ed99e3270262e0e0f9dfb84828e0 (diff) | |
download | Mime-6775f986a757b29e598925846cb862c59cffdc62.zip Mime-6775f986a757b29e598925846cb862c59cffdc62.tar.gz Mime-6775f986a757b29e598925846cb862c59cffdc62.tar.bz2 |
Remove from/import.
-rw-r--r-- | Exception/Exception.php | 14 | ||||
-rw-r--r-- | Exception/MimeIsNotFound.php | 15 | ||||
-rw-r--r-- | Mime.php | 39 |
3 files changed, 16 insertions, 52 deletions
diff --git a/Exception/Exception.php b/Exception/Exception.php index 7e286d7..4d3fe1a 100644 --- a/Exception/Exception.php +++ b/Exception/Exception.php @@ -34,7 +34,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ -namespace Hoa\Mime\Exception { +namespace Hoa\Mime\Exception; + +use Hoa\Core; /** * Class \Hoa\Mime\Exception. @@ -46,15 +48,9 @@ namespace Hoa\Mime\Exception { * @license New BSD License */ -class Exception extends \Hoa\Core\Exception { } - -} - -namespace { +class Exception extends Core\Exception { } /** * Flex entity. */ -Hoa\Core\Consistency::flexEntity('Hoa\Mime\Exception\Exception'); - -} +Core\Consistency::flexEntity('Hoa\Mime\Exception\Exception'); diff --git a/Exception/MimeIsNotFound.php b/Exception/MimeIsNotFound.php index ef3e948..d5c9c62 100644 --- a/Exception/MimeIsNotFound.php +++ b/Exception/MimeIsNotFound.php @@ -34,18 +34,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -namespace { - -from('Hoa') - -/** - * \Hoa\Mime\Exception - */ --> import('Mime.Exception.~'); - -} - -namespace Hoa\Mime\Exception { +namespace Hoa\Mime\Exception; /** * Class \Hoa\Mime\MimeIsNotFound. @@ -58,5 +47,3 @@ namespace Hoa\Mime\Exception { */ class MimeIsNotFound extends Exception { } - -} @@ -34,23 +34,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ -namespace { +namespace Hoa\Mime; -from('Hoa') - -/** - * \Hoa\Mime\Exception - */ --> import('Mime.Exception.~') - -/** - * \Hoa\Mime\Exception\MimeIsNotFound - */ --> import('Mime.Exception.MimeIsNotFound'); - -} - -namespace Hoa\Mime { +use Hoa\Core; +use Hoa\Stream; /** * Class \Hoa\Mime. @@ -63,7 +50,7 @@ namespace Hoa\Mime { * @license New BSD License */ -class Mime implements \Hoa\Core\Parameter\Parameterizable { +class Mime implements Core\Parameter\Parameterizable { /** * Structure: media/type part. @@ -155,12 +142,12 @@ class Mime implements \Hoa\Core\Parameter\Parameterizable { * @param \Hoa\Stream $stream Stream to study. * @param array $parameters Parameters. * @return void - * @throw \Hoa\Controller\Exception + * @throw \Hoa\Mime\Exception */ - public function __construct ( \Hoa\Stream $stream, + public function __construct ( Stream $stream, Array $parameters = array() ) { - $this->_parameters = new \Hoa\Core\Parameter( + $this->_parameters = new Core\Parameter( $this, array(), array( @@ -368,11 +355,11 @@ class Mime implements \Hoa\Core\Parameter\Parameterizable { * @return void * @throw \Hoa\Mime\Exception\MimeIsNotFound */ - protected function _find ( \Hoa\Stream $stream ) { + protected function _find ( Stream $stream ) { $name = $stream->getStreamName(); - if($stream instanceof \Hoa\Stream\IStream\Pathable) + if($stream instanceof Stream\IStream\Pathable) $based = $stream->getBasename(); else $based = basename($name); @@ -483,13 +470,7 @@ class Mime implements \Hoa\Core\Parameter\Parameterizable { } } -} - -namespace { - /** * Flex entity. */ -Hoa\Core\Consistency::flexEntity('Hoa\Mime\Mime'); - -} +Core\Consistency::flexEntity('Hoa\Mime\Mime'); |