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