예제 #1
0
//echo "Time cookie " . \Framework\HttpContext\HttpContext::getInstance()->getCookies()->time . " END";
//var_dump($_COOKIE);
//
//\Framework\HttpContext\HttpContext::getInstance()->getCookies()->time->delete();
//
//var_dump($_COOKIE);
//
//exit;
//\Framework\HttpContext\HttpContext::getInstance()->getSession()->time->delete();
//
//var_dump($_SESSION);
//
//$date = new DateTime('now', new DateTimeZone('Europe/Sofia'));
//\Framework\HttpContext\HttpContext::getInstance()->getSession()->time = $date->format("Y-m-d H:i:s");
//
//echo "Time session " . \Framework\HttpContext\HttpContext::getInstance()->getSession()->time . " END";
//var_dump($_SESSION);
//
//\Framework\HttpContext\HttpContext::getInstance()->getSession()->time->delete();
//
//var_dump($_SESSION);
//
//exit;
//var_dump(\Framework\HttpContext\HttpContext::getInstance()->getRequest()->getForm()->username);
//var_dump(\Framework\HttpContext\HttpContext::getInstance()->getRequest()->test2);
//
//exit;
$router = new Framework\Routers\Router();
$frontController = new \Framework\FrontController($router);
$app = new \Framework\App($frontController);
$app->start();
예제 #2
0
<?php

error_reporting(E_ALL);
require_once 'Library\\Autoloader.php';
Framework\Library\Autoloader::register();
Framework\Helpers\Session::start();
$app = new \Framework\App();
$app->init();
$app->start();
$frontController = new Framework\Library\FrontController($app->getController(), $app->getAction(), $app->getRequestParams());
$frontController->run();
예제 #3
0
파일: index.php 프로젝트: sedpro/framework
<?php

require '../Framework/Autoloader.php';
Framework\Autoloader::register();
$config = (require '../App/config/config.php');
$app = new Framework\App($config);
$app->run();