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; }
/** * */ 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'))); }
public function __construct() { $this->routes = Config::getRoutes(); }
/** * Generate password hash * * @param string $password * @return string */ public function generatePasswordHash($password) { return md5($this->config->get('salt') . $password); }