This commit is contained in:
2020-12-17 14:09:14 +08:00
parent 672a719dbd
commit 36c1d0502a
151 changed files with 1937 additions and 2848 deletions
+6 -10
View File
@@ -15,8 +15,6 @@ use Exception;
use HttpServer\Route\Router;
use Kafka\Producer;
use Snowflake\Abstracts\BaseGoto;
use Snowflake\Annotation\Annotation;
use Snowflake\Cache\Memcached;
use Snowflake\Cache\Redis;
use Snowflake\Error\Logger;
use Snowflake\Event;
@@ -30,7 +28,6 @@ use Snowflake\Snowflake;
* Class WebController
* @package Snowflake\Snowflake\Web
* @property BaseGoto $goto
* @property Annotation $annotation
* @property Event $event
* @property Router $router
* @property SPool $pool
@@ -38,7 +35,6 @@ use Snowflake\Snowflake;
* @property Server $server
* @property DatabasesProviders $db
* @property Connection $connections
* @property Memcached $memcached
* @property Logger $logger
* @property Jwt $jwt
* @property Client $client
@@ -131,23 +127,23 @@ class Controller extends Application
/**
* @param $methods
* @param $name
* @return mixed
* @throws ComponentException
*/
public function __get($methods): mixed
public function __get($name): mixed
{
// TODO: Change the autogenerated stub
if (property_exists($this, $methods)) {
return $this->$methods;
if (property_exists($this, $name)) {
return $this->$name;
}
$method = 'get' . ucfirst($methods);
$method = 'get' . ucfirst($name);
if (method_exists($this, $method)) {
return $this->{$method}();
}
return Snowflake::app()->get($methods);
return Snowflake::app()->get($name);
}