PHP Classes

File: web/app.php

Recommend this page to a friend!
  Classes of Omar Shaban  >  PHP Game of Three  >  web/app.php  >  Download  
File: web/app.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Game of Three
Game of Three implementation using Websockets
Author: By
Last change:
Date: 1 year ago
Size: 1,014 bytes


Class file image Download

use Symfony\Component\ClassLoader\ApcClassLoader;

$loader = require_once __DIR__.'/../app/bootstrap.php.cache';

// Enable APC for autoloading to improve performance.
// You should change the ApcClassLoader first argument to a unique prefix
// in order to prevent cache key conflicts with other applications
// also using APC.
$apcLoader = new ApcClassLoader(sha1(__FILE__), $loader);

require_once __DIR__.'/../app/AppKernel.php';
//require_once __DIR__.'/../app/AppCache.php';

$kernel = new AppKernel('prod', false);
//$kernel = new AppCache($kernel);

// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$kernel->terminate($request, $response);

For more information send a message to info at phpclasses dot org.