/var/www/clients/client7/web34/web/server/core/configs/Device.php
self::$IS_DESKTOP = self::$DEVICE == 'desktop';
self::$IS_TABLET = self::$DEVICE == 'tablet';
self::$IS_MOBILE = self::$DEVICE == 'mobile';
}
private function setBrowser()
{
self::$BROWSER = $this->whichBrowser->browser->name;
self::$BROWSER_VERSION = $this->whichBrowser->browser->getVersion();
self::$BROWSER_ENGINE = $this->whichBrowser->engine->getName();
if ( $this->whichBrowser->isBrowser( 'Internet Explorer', '<', '9' ) ||
$this->whichBrowser->isBrowser( 'Firefox', '<', '35' ) ||
$this->whichBrowser->isBrowser( 'Opera', '<', '30' ) ||
$this->whichBrowser->isBrowser( 'Safari', '<', '6' ) ||
$this->whichBrowser->isBrowser( 'Chrome', '<', '30' ) )
self::$IS_OLD_BROWSER = true;
else
/var/www/clients/client7/web34/web/server/core/configs/Device.php
self::$IS_DESKTOP = self::$DEVICE == 'desktop';
self::$IS_TABLET = self::$DEVICE == 'tablet';
self::$IS_MOBILE = self::$DEVICE == 'mobile';
}
private function setBrowser()
{
self::$BROWSER = $this->whichBrowser->browser->name;
self::$BROWSER_VERSION = $this->whichBrowser->browser->getVersion();
self::$BROWSER_ENGINE = $this->whichBrowser->engine->getName();
if ( $this->whichBrowser->isBrowser( 'Internet Explorer', '<', '9' ) ||
$this->whichBrowser->isBrowser( 'Firefox', '<', '35' ) ||
$this->whichBrowser->isBrowser( 'Opera', '<', '30' ) ||
$this->whichBrowser->isBrowser( 'Safari', '<', '6' ) ||
$this->whichBrowser->isBrowser( 'Chrome', '<', '30' ) )
self::$IS_OLD_BROWSER = true;
else
/var/www/clients/client7/web34/web/server/core/configs/Device.php
private $params = null;
protected function __construct()
{
$this->whichBrowser = new WhichBrowser\Parser( getallheaders(), [ 'detectBots' => false ] );
$this->getConfig();
$this->setDevice();
$this->setBrowser();
$this->setTargetedVersion();
$this->setParams();
}
public static function getInstance()
{
if ( !isset( self::$instance ) )
self::$instance = new self;
/var/www/clients/client7/web34/web/server/core/configs/Device.php
$this->setBrowser();
$this->setTargetedVersion();
$this->setParams();
}
public static function getInstance()
{
if ( !isset( self::$instance ) )
self::$instance = new self;
return self::$instance;
}
private function getConfig()
{
self::$HAS_MOBILE_VERSION = Config::$HAS_MOBILE_VERSION;
self::$TABLET_VERSION = Config::$TABLET_VERSION;
self::$FORCE_DEVICE = Config::$FORCE_DEVICE;
/var/www/clients/client7/web34/web/server/Main.php
private function setConfig()
{
$this->config = Config::getInstance();
}
private function setDevice()
{
$this->device = Device::getInstance();
}
private function setPath()
{
$this->path = Path::getInstance();
}
private function setLang()
/var/www/clients/client7/web34/web/server/Main.php
private $lang = null;
private $router = null;
private $pagesController = null;
protected function __construct()
{
$this->setWhoops();
$this->setConfig();
$this->setDevice();
$this->setPath();
$this->setLang();
$this->initConfig();
$this->setRoutes();
$this->setPagesController();
}
public static function getInstance()
{
/var/www/clients/client7/web34/web/server/Main.php
$this->initConfig();
$this->setRoutes();
$this->setPagesController();
}
public static function getInstance()
{
if ( !isset( self::$instance ) )
self::$instance = new self;
return self::$instance;
}
private function setWhoops()
{
$whoops = new \Whoops\Run;
$whoops->pushHandler( new \Whoops\Handler\PrettyPageHandler );
$whoops->register();
/var/www/clients/client7/web34/web/index.php
if (strpos($url,'.com') !== false) {
echo 'Car exists.';
$url = str_replace(".com", ".fr", $url);
header('Location: ' . $url);
}
include_once 'server/Main.php';
$main = Main::getInstance();
$main->displayView();
?>