Jump to content

Silex Micro-Framework, Running Error/white Screen.


Zoombat

Recommended Posts

So my silex application did run for a good time, but now it's disfunctional, and I do not know exactly why, because I believe nothing changed..

 

It should be a little website with administration page.

- This is a snippet of the code, the total code is still in concept phase.

- For the full code: http://pastebin.com/myXwF4nT

- Other code parts on request.

- Controller::invoke() is called from the index.php

 

Thanks in advance!

 

require_once __DIR__.'/vendor/autoload.php';
require_once __DIR__.'/const.php';
require_once __DIR__.'/route.php';
require_once __DIR__.'/../model/database.php';

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelInterface;

class Controller
{
public static $appProvider = null;
public static $expireTime = 5400;
public static $timeStamp = null;
public static $routeArray = null;
public static $routeMatched = null;
public static $subRouteMatched = null;

public static function getSilex()
{
if(self::$appProvider == null)
{
self::$appProvider = new Silex\Application();
// Twig Service Provider
self::$appProvider->register(
new Silex\Provider\TwigServiceProvider(),
array('twig.path' => __DIR__.'/../view/',
 'twig.options' => array('cache' => __DIR__.'/../cache'),));
self::$appProvider['debug'] = true;
}
return self::$appProvider;
}

public static function invoke()
{
// example
$silex = self::getSilext()->run();
}
....
}

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.