public static function getInstance() { if (empty(self::$instance)) { self::$instance = new self(); } return self::$instance; }
public static function getDb() { if (self::$database === null) { self::$database = new Database(self::DB_NAME, self::DB_USER, self::DB_PASS, self::DB_HOST); } return self::$database; }
/** * Retourne l'instance du container App * @return self */ public static function getInstance() { if (is_null(self::$instance)) { self::$instance = new App(); } return self::$instance; }
/** * Returns the singleton instance of this class. * * @return App */ public static function instance() { if (!isset(self::$instance)) { self::$instance = new self(); } return self::$instance; }
public static function getDatabase() { if (self::$database === null) { self::$database = new Database(self::DB_NAME); } return self::$database; }
public static function getInstance($translator = null) { if (is_null(self::$_instance)) { self::$_instance = new App(); if (empty(self::$translator)) { self::$translator = $translator; } } return self::$_instance; }
public static function setResetFlash($reset) { self::$resetFlash = $reset; }
public static function setTitle($title) { self::$title = $title; }
/** * @param $title Défini le title de la page */ public static function setTitle($title) { self::$title_page = $title . ' | ' . Config::get('app.title'); }