コード例 #1
0
ファイル: Session.php プロジェクト: alevikzs/phrest
 /**
  * @param string $algorithm
  * @param string $salt
  */
 public function __construct($algorithm = 'HS256', $salt = null)
 {
     if (is_null($salt)) {
         $salt = Local::get()->getSecurity()->getSalt();
     }
     $this->setAlgorithm($algorithm)->setSalt($salt);
 }
コード例 #2
0
ファイル: Test.php プロジェクト: alevikzs/phrest-app
 /**
  * @return Pdo
  */
 public function getDatabase()
 {
     return Local::get()->getDatabase()->getTestInstance();
 }
コード例 #3
0
ファイル: index.php プロジェクト: alevikzs/phrest-app
<?php

ini_set('display_errors', true);
error_reporting(E_ALL);
include __DIR__ . "/../../vendor/autoload.php";
(new \Phalcon\DI\FactoryDefault())->set('db', function () {
    return \PhRest\Config\Local::get()->getDatabase()->getTestInstance();
});