/** * Application initialization. * do your inital stuff here like getting the current user object ect.. * You can return a CCResponse wich will cancle all other actions * if enebaled ( see. main.config -> send_app_wake_response ) * * @return void | CCResponse */ public static function wake() { /* * Start the session by adding the current uri */ CCSession::set('uri', CCServer::uri()); /* * try to authenticate the user */ //static::$user =& CCAuth::handler()->user; /* * load the App configuration */ static::$config = CCConfig::create('app'); }
<?php /* *--------------------------------------------------------------- * ClanCatsFramework runner *--------------------------------------------------------------- * * This file just loads CCF and all needed resources to run the * php unit tests. PHPUnit is a really elegant way to make sure * that everything works how it should. * *--------------------------------------------------------------- * Require CCF *--------------------------------------------------------------- * * load the framework file wich wil initialize CCF. */ require_once __DIR__ . "/clancatsapp/framework.php"; /* * execute the main request * The main request contains the params of the http header */ $response = CCRequest::uri(CCServer::uri())->perform()->response(); /* * "send" means actaully printing the response. * If the secound parameter is true the response will * also set headers */ $response->send(true);