Ejemplo n.º 1
0
 public static function getConnection()
 {
     $db_params = Config::getDbParams();
     $dsn = "mysql:host={$db_params['host']};dbname={$db_params['db_name']}";
     $db = new PDO($dsn, $db_params['user'], $db_params['password']);
     return $db;
 }
Ejemplo n.º 2
0
 /**
  *
  */
 public function __construct()
 {
     if (session_status() == PHP_SESSION_NONE) {
         session_start();
     }
     // init Instagram library
     $this->instagram = new Instagram(array('apiKey' => Config::get('apiKey'), 'apiSecret' => Config::get('apiSecret'), 'apiCallback' => Config::get('apiCallback')));
 }
Ejemplo n.º 3
0
 public function __construct()
 {
     $this->routes = Config::getRoutes();
 }
Ejemplo n.º 4
0
 /**
  * Generate password hash
  * 
  * @param string $password
  * @return string
  */
 public function generatePasswordHash($password)
 {
     return md5($this->config->get('salt') . $password);
 }