Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to the new AiP class-naming scheme #48

Merged
merged 3 commits into from Mar 31, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions httpd/appserv_app.php
Expand Up @@ -58,15 +58,15 @@ public function __invoke($context)
$mvc = midgardmvc_core::get_instance(); $mvc = midgardmvc_core::get_instance();
$mvc->dispatcher->set_request_data($context); $mvc->dispatcher->set_request_data($context);


call_user_func($context['logger'], "-> starting midgardmvc"); // call_user_func($context['logger'], "-> starting midgardmvc");
try { try {
ob_start(); ob_start();
$request = $mvc->process(); $request = $mvc->process();
$mvc->serve($request); $mvc->serve($request);
$body = ob_get_clean(); $body = ob_get_clean();
} catch (StartNewRequestException $e) { } catch (StartNewRequestException $e) {
$body = ob_get_clean(); $body = ob_get_clean();
call_user_func($context['logger'], "--> [!] StartNewRequestException exception arrived"); // call_user_func($context['logger'], "--> [!] StartNewRequestException exception arrived");
} catch (midgardmvc_exception $e) { } catch (midgardmvc_exception $e) {
ob_end_clean(); ob_end_clean();


Expand All @@ -85,7 +85,7 @@ public function __invoke($context)
throw $e; throw $e;
} }


call_user_func($context['logger'], "-> done with midgardmvc"); // call_user_func($context['logger'], "-> done with midgardmvc");


return array( return array(
$mvc->dispatcher->_get_status(), $mvc->dispatcher->_get_status(),
Expand Down
14 changes: 9 additions & 5 deletions httpd/appserv_runner_app.php
@@ -1,9 +1,13 @@
<?php <?php


use MFS\AppServer\Apps\FileServe\FileServe as file_server; if (!class_exists('\AiP\Runner', false))
use MFS\AppServer\Middleware\PHP_Compat\PHP_Compat as aip_php_compat; throw new pakeException("You use an old version of AppServer. Please upgrade");
use MFS\AppServer\Middleware\Logger\Logger as aip_logger;
use MFS\AppServer\Middleware\Session\Session as aip_session; 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'; require __DIR__.'/appserv_app.php';


Expand All @@ -28,7 +32,7 @@ public function __construct()
$urlmap["/midgardmvc-static/{$component->name}"] = new file_server("{$_midgardmvc_root}{$component->name}/static", 4000000); $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 // we also want logging
$this->app = new aip_logger($map, STDOUT); $this->app = new aip_logger($map, STDOUT);
Expand Down