Skip to content

Switch to the new AiP class-naming scheme #48

Merged
merged 3 commits into from Mar 31, 2011
View
6 httpd/appserv_app.php
@@ -58,15 +58,15 @@ public function __invoke($context)
$mvc = midgardmvc_core::get_instance();
$mvc->dispatcher->set_request_data($context);
- call_user_func($context['logger'], "-> starting midgardmvc");
+ // call_user_func($context['logger'], "-> starting midgardmvc");
try {
ob_start();
$request = $mvc->process();
$mvc->serve($request);
$body = ob_get_clean();
} catch (StartNewRequestException $e) {
$body = ob_get_clean();
- call_user_func($context['logger'], "--> [!] StartNewRequestException exception arrived");
+ // call_user_func($context['logger'], "--> [!] StartNewRequestException exception arrived");
} catch (midgardmvc_exception $e) {
ob_end_clean();
@@ -85,7 +85,7 @@ public function __invoke($context)
throw $e;
}
- call_user_func($context['logger'], "-> done with midgardmvc");
+ // call_user_func($context['logger'], "-> done with midgardmvc");
return array(
$mvc->dispatcher->_get_status(),
View
14 httpd/appserv_runner_app.php
@@ -1,9 +1,13 @@
<?php
-use MFS\AppServer\Apps\FileServe\FileServe as file_server;
-use MFS\AppServer\Middleware\PHP_Compat\PHP_Compat as aip_php_compat;
-use MFS\AppServer\Middleware\Logger\Logger as aip_logger;
-use MFS\AppServer\Middleware\Session\Session as aip_session;
+if (!class_exists('\AiP\Runner', false))
+ throw new pakeException("You use an old version of AppServer. Please upgrade");
+
+use AiP\App\FileServe as file_server;
+use AiP\Middleware\HTTPParser as aip_php_compat;
+use AiP\Middleware\Logger as aip_logger;
+use AiP\Middleware\Session as aip_session;
+use AiP\Middleware\URLMap as aip_urlmap;
require __DIR__.'/appserv_app.php';
@@ -28,7 +32,7 @@ public function __construct()
$urlmap["/midgardmvc-static/{$component->name}"] = new file_server("{$_midgardmvc_root}{$component->name}/static", 4000000);
}
- $map = new \MFS\AppServer\Middleware\URLMap\URLMap($urlmap);
+ $map = new aip_urlmap($urlmap);
// we also want logging
$this->app = new aip_logger($map, STDOUT);
Something went wrong with that request. Please try again.