Esempio n. 1
0
 /**
  * @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);
 }
Esempio n. 2
0
 /**
  * @return Pdo
  */
 public function getDatabase()
 {
     return Local::get()->getDatabase()->getTestInstance();
 }
Esempio n. 3
0
<?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();
});