]> git.mxchange.org Git - core.git/blobdiff - application/tests/class_ApplicationHelper.php
namespace added, this *must* be applied now to all calls of ObjectFactory methods
[core.git] / application / tests / class_ApplicationHelper.php
index c334b9c09b3c9dc87c767891116e83ae8d204082..670cf90154f3b7d5a6cff606dca63036ae6dc016 100644 (file)
@@ -1,4 +1,15 @@
 <?php
+// Own namespace
+namespace CoreFramework\Helper\Application;
+
+// Import framework stuff
+use CoreFramework\Manager\ManageableApplication;
+use CoreFramework\Object\BaseFrameworkSystem;
+use CoreFramework\Factory\ObjectFactory;
+use CoreFramework\Registry\Registerable;
+use CoreFramework\Registry\Generic\Registry;
+use CoreFramework\Template\CompileableTemplate;
+
 /**
  * A class holding general data about the application and some methods for
  * the management including the entry point.
@@ -157,7 +168,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                $responseType = self::getResponseTypeFromSystem();
 
                // Create a new request object
-               $requestInstance = ObjectFactory::createObjectByName(self::convertToClassName($response) . 'Request');
+               $requestInstance = ObjectFactory::createObjectByName(sprintf('\CoreFramework\Request\%sRequest', self::convertToClassName($response)));
 
                // Remember request instance here
                $this->setRequestInstance($requestInstance);
@@ -170,7 +181,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                } // END - if
 
                // ... and a new response object
-               $responseClass = sprintf('%sResponse', self::convertToClassName($response));
+               $responseClass = sprintf('\CoreFramework\Response\%sResponse', self::convertToClassName($response));
                $responseInstance = ObjectFactory::createObjectByName($responseClass, array($this));
 
                // Remember response instance here
@@ -239,7 +250,5 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
        public function assignExtraTemplateData (CompileableTemplate $templateInstance) {
                $this->partialStub('Unfinished method. templateInstance=' . $templateInstance->__toString());
        }
-}
 
-// [EOF]
-?>
+}