Skip to content

Commit

Permalink
Clean code for KernelTrait
Browse files Browse the repository at this point in the history
  • Loading branch information
xujiajun committed Nov 1, 2017
1 parent dbd9453 commit 21ac883
Showing 1 changed file with 0 additions and 59 deletions.
59 changes: 0 additions & 59 deletions src/Framework/Traits/KernelTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,66 +177,7 @@ public function getListeners($key = '')
return $this->listeners;
}

//ServiceProvider register

protected function registerRedisService()
{
$this->replaceServiceProvider("Redis", [RedisServiceProvider::class,true]);
}

protected function registerCacheService()
{
$this->replaceServiceProvider("Cache", [CacheServiceProvider::class,true]);
}

protected function registerFileCacheService()
{
$this->replaceServiceProvider("FileCache", [FileCacheServiceProvider::class,true]);
}

protected function registerLoggerService()
{
$this->replaceServiceProvider("Logger", [LoggerServiceProvider::class,true]);
}

protected function registerTwigService()
{
$this->replaceServiceProvider("Twig", [TwigServiceProvider::class,true]);
}

//v1.7.8 remove
// protected function registerDoctrineService()
// {
// $this->replaceServiceProvider("Doctrine", [DoctrineServiceProvider::class,true]);
// }

protected function registerDbsService()
{
$this->replaceServiceProvider("Dbs", [DoctrineServiceProvider::class,true]);
}

protected function registerCsrfTokenService()
{
$this->replaceServiceProvider("CsrfToken", [CsrfTokenServiceProvider::class,true]);
}

protected function registerJwtService()
{
$this->replaceServiceProvider("Jwt", [JwtServiceProvider::class,true]);
}

protected function registerSwiftMailerService()
{
$this->replaceServiceProvider("SwiftMailer", [SwiftMailerServiceProvider::class,true]);
}

protected function registerQueueService()
{
$this->replaceServiceProvider("Queue", [QueueServiceProvider::class,true]);
}

// kernel listener register

/**
* @param $listener
* @param string $action
Expand Down

0 comments on commit 21ac883

Please sign in to comment.