2015-05-05 20:33:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Gist;
|
|
|
|
|
|
|
|
use Silex\Application as SilexApplication;
|
|
|
|
|
|
|
|
/**
|
2016-11-13 00:44:23 +01:00
|
|
|
* @deprecated The static version should be avoided, use DI instead
|
2015-05-05 20:33:05 +02:00
|
|
|
*/
|
|
|
|
class Application extends SilexApplication
|
|
|
|
{
|
2016-11-13 00:44:23 +01:00
|
|
|
/**
|
|
|
|
* Creates an instance of Application.
|
|
|
|
*
|
|
|
|
* @static
|
|
|
|
*
|
|
|
|
* @return Application
|
|
|
|
*/
|
2015-05-05 20:33:05 +02:00
|
|
|
public static function getInstance()
|
|
|
|
{
|
|
|
|
static $app;
|
|
|
|
|
|
|
|
if (null === $app) {
|
2016-11-13 00:44:23 +01:00
|
|
|
$app = new static();
|
2015-05-05 20:33:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return $app;
|
|
|
|
}
|
|
|
|
}
|