1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-24 20:06:09 +08:00
2020-01-30 16:51:10 +08:00

26 lines
424 B
PHP

<?php
namespace App\Providers;
use Phalcon\Crypt as PhalconCrypt;
class Crypt extends Provider
{
protected $serviceName = 'crypt';
public function register()
{
$this->di->setShared($this->serviceName, function () {
$config = $this->getShared('config');
$crypt = new PhalconCrypt();
$crypt->setKey($config->key);
return $crypt;
});
}
}