aboutsummaryrefslogtreecommitdiffstats
path: root/Mime.php
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2014-09-17 18:50:49 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2014-09-17 18:50:49 +0200
commit6775f986a757b29e598925846cb862c59cffdc62 (patch)
treed2c10725d4e1b0b71a36b4529452b8a003454739 /Mime.php
parent3aee0f2a4385ed99e3270262e0e0f9dfb84828e0 (diff)
downloadMime-6775f986a757b29e598925846cb862c59cffdc62.zip
Mime-6775f986a757b29e598925846cb862c59cffdc62.tar.gz
Mime-6775f986a757b29e598925846cb862c59cffdc62.tar.bz2
Remove from/import.
Diffstat (limited to 'Mime.php')
-rw-r--r--Mime.php39
1 files changed, 10 insertions, 29 deletions
diff --git a/Mime.php b/Mime.php
index 890bb90..13efd7c 100644
--- a/Mime.php
+++ b/Mime.php
@@ -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');