改名
This commit is contained in:
@@ -319,7 +319,7 @@ abstract class BaseApplication extends Component
|
|||||||
*/
|
*/
|
||||||
public function getRedis(): Redis|\Redis
|
public function getRedis(): Redis|\Redis
|
||||||
{
|
{
|
||||||
return $this->get('redis');
|
return Kiri::getDi()->get(Redis::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -463,7 +463,6 @@ abstract class BaseApplication extends Component
|
|||||||
'config' => ['class' => Config::class],
|
'config' => ['class' => Config::class],
|
||||||
'logger' => ['class' => Logger::class],
|
'logger' => ['class' => Logger::class],
|
||||||
'annotation' => ['class' => SAnnotation::class],
|
'annotation' => ['class' => SAnnotation::class],
|
||||||
'redis' => ['class' => Redis::class],
|
|
||||||
'databases' => ['class' => Connection::class],
|
'databases' => ['class' => Connection::class],
|
||||||
'aop' => ['class' => AspectManager::class],
|
'aop' => ['class' => AspectManager::class],
|
||||||
'input' => ['class' => HttpParams::class],
|
'input' => ['class' => HttpParams::class],
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ use Server\Server;
|
|||||||
use Http\Shutdown;
|
use Http\Shutdown;
|
||||||
use Kiri\Crontab\Producer;
|
use Kiri\Crontab\Producer;
|
||||||
use Kiri\Async;
|
use Kiri\Async;
|
||||||
use Kiri\Cache\Redis;
|
|
||||||
use Kiri\Error\Logger;
|
use Kiri\Error\Logger;
|
||||||
use Kiri\Jwt\Jwt;
|
use Kiri\Jwt\Jwt;
|
||||||
|
|
||||||
@@ -23,7 +22,6 @@ use Kiri\Jwt\Jwt;
|
|||||||
* Trait TraitApplication
|
* Trait TraitApplication
|
||||||
* @package Kiri\Abstracts
|
* @package Kiri\Abstracts
|
||||||
* @property Router $router
|
* @property Router $router
|
||||||
* @property \Redis|Redis $redis
|
|
||||||
* @property Server $server
|
* @property Server $server
|
||||||
* @property DatabasesProviders $db
|
* @property DatabasesProviders $db
|
||||||
* @property Async $async
|
* @property Async $async
|
||||||
|
|||||||
+1
-1
@@ -394,7 +394,7 @@ if (!function_exists('redis')) {
|
|||||||
*/
|
*/
|
||||||
function redis(): \Kiri\Cache\Redis|Redis
|
function redis(): \Kiri\Cache\Redis|Redis
|
||||||
{
|
{
|
||||||
return Kiri::app()->getRedis();
|
return Kiri::getDi()->get(\Kiri\Cache\Redis::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -12,6 +12,7 @@ namespace Gii;
|
|||||||
use Database\Connection;
|
use Database\Connection;
|
||||||
use Database\Db;
|
use Database\Db;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use Kiri\Cache\Redis;
|
||||||
use Kiri\Exception\ComponentException;
|
use Kiri\Exception\ComponentException;
|
||||||
use Kiri\Exception\ConfigException;
|
use Kiri\Exception\ConfigException;
|
||||||
use Kiri\Kiri;
|
use Kiri\Kiri;
|
||||||
@@ -64,7 +65,6 @@ class Gii
|
|||||||
* @param $db
|
* @param $db
|
||||||
* @return array
|
* @return array
|
||||||
* @throws ComponentException
|
* @throws ComponentException
|
||||||
* @throws ConfigException
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function gen(InputInterface $input, $db): array
|
public function gen(InputInterface $input, $db): array
|
||||||
@@ -103,7 +103,6 @@ class Gii
|
|||||||
* @param $make
|
* @param $make
|
||||||
* @param $input
|
* @param $input
|
||||||
* @return array
|
* @return array
|
||||||
* @throws ComponentException
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function getModel($make, $input): array
|
private function getModel($make, $input): array
|
||||||
@@ -126,7 +125,7 @@ class Gii
|
|||||||
*/
|
*/
|
||||||
private function makeByDatabases($make, InputInterface $input): array
|
private function makeByDatabases($make, InputInterface $input): array
|
||||||
{
|
{
|
||||||
$redis = Kiri::app()->getRedis();
|
$redis = Kiri::getDi()->get(Redis::class);
|
||||||
if (!empty($input->getArgument('name'))) {
|
if (!empty($input->getArgument('name'))) {
|
||||||
$this->tableName = $input->getArgument('name');
|
$this->tableName = $input->getArgument('name');
|
||||||
$redis->del('column:' . $this->tableName);
|
$redis->del('column:' . $this->tableName);
|
||||||
|
|||||||
Reference in New Issue
Block a user