public function __construct() { list(, $this->_application) = explode('/', $_SERVER['PATH_INFO']); $this->_applicationPath = Server::getInstance()->loadAppContext($this->_application); Oktopus\Engine::autoloader()->addPath($this->_applicationPath, true, true); $this->_requestMethod = $_SERVER['REQUEST_METHOD']; $this->_path = substr($_SERVER['PATH_INFO'], strpos($_SERVER['PATH_INFO'], '/', 2)); }
<?php /** * Created by JetBrains PhpStorm. * User: juliens * Date: 14/06/11 * Time: 20:21 * To change this template use File | Settings | File Templates. */ require_once './oktopus/Oktopus/Engine.php'; Oktopus\Engine::start('/tmp/'); Oktopus\Engine::autoloader()->addPath('./Engine', true, true); if (Server::getInstance()->isRunning()) { echo "Le serveur est démarré depuis " . date("d/m/Y H:i:s", Server::getInstance()->getServerDate()) . "<br />"; echo "<h1>Applications : </h1><ul>"; Server::getInstance()->loadConfig(); $apps = Server::getInstance()->getConfig("AppList"); if (is_array($apps)) { foreach ($apps as $app) { echo "<li>{$app}<a href=\"./phar.php?app={$app}\">phar</a></li>"; } echo "</ul>"; } } else { echo "Le serveur n'est pas démarré"; }