改名
This commit is contained in:
@@ -5,13 +5,8 @@ namespace Snowflake\Crontab;
|
||||
|
||||
|
||||
use Exception;
|
||||
use ReflectionException;
|
||||
use Snowflake\Event;
|
||||
use Snowflake\Exception\ComponentException;
|
||||
use Snowflake\Exception\NotFindClassException;
|
||||
use Snowflake\Process\Process;
|
||||
use Snowflake\Snowflake;
|
||||
use Swoole\Coroutine;
|
||||
use Swoole\Coroutine\WaitGroup;
|
||||
use Swoole\Coroutine\Channel;
|
||||
use Swoole\Timer;
|
||||
@@ -38,9 +33,6 @@ class ZookeeperProcess extends Process
|
||||
|
||||
/**
|
||||
* @param \Swoole\Process $process
|
||||
* @throws ReflectionException
|
||||
* @throws ComponentException
|
||||
* @throws NotFindClassException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function onHandler(\Swoole\Process $process): void
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Snowflake;
|
||||
|
||||
|
||||
interface IProxy
|
||||
{
|
||||
|
||||
public function execute();
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Snowflake;
|
||||
|
||||
|
||||
class Proxy
|
||||
{
|
||||
|
||||
/**
|
||||
* Proxy constructor.
|
||||
* @param IProxy $IProxy
|
||||
*/
|
||||
public function __construct(public IProxy $IProxy)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function execute(): mixed
|
||||
{
|
||||
return $this->IProxy->execute();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,7 +14,6 @@ use ReflectionException;
|
||||
use Snowflake\Abstracts\Config;
|
||||
use Snowflake\Core\Json;
|
||||
use Snowflake\Di\Container;
|
||||
use Snowflake\Exception\ComponentException;
|
||||
use Snowflake\Exception\NotFindClassException;
|
||||
use Snowflake\Process\Process;
|
||||
use Swoole\Coroutine;
|
||||
|
||||
Reference in New Issue
Block a user