Move SwooleEvent

This commit is contained in:
huangzhhui 2019-01-21 19:39:42 +08:00
parent 955da41b8e
commit d753472138
5 changed files with 4 additions and 6 deletions

View File

@ -26,9 +26,8 @@ class Model extends BaseModel
*/
public function getConnection(): ConnectionInterface
{
$connectionName = $this->getConnectionName();
$resolver = ApplicationContext::getContainer()->get(ConnectionResolver::class);
return $resolver->connection($connectionName);
return $resolver->connection($this->getConnectionName());
}
public function getEventDispatcher()

View File

@ -11,7 +11,7 @@ declare(strict_types=1);
namespace Hyperf\Framework\Bootstrap;
use Hyperf\Framework\Constants\SwooleEvent;
use Hyperf\Framework\SwooleEvent;
use Hyperf\Memory;
class ServerStartCallback

View File

@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Hyperf\Framework\Bootstrap;
use Hyperf\Di\Container;
use Hyperf\Framework\Constants\SwooleEvent;
use Hyperf\Framework\SwooleEvent;
use Hyperf\Framework\Contract\StdoutLoggerInterface;
use Hyperf\Memory\AtomicManager;
use Hyperf\Memory\LockManager;

View File

@ -13,7 +13,6 @@ namespace Hyperf\Framework;
use Hyperf\Contract\ProcessInterface;
use Hyperf\Contract\ServerOnRequestInterface;
use Hyperf\Framework\Constants\SwooleEvent;
use Hyperf\Framework\Contract\StdoutLoggerInterface;
use InvalidArgumentException;
use Psr\Container\ContainerInterface;

View File

@ -9,7 +9,7 @@ declare(strict_types=1);
* @license https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE
*/
namespace Hyperf\Framework\Constants;
namespace Hyperf\Framework;
class SwooleEvent
{