eee
This commit is contained in:
+23
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Kiri;
|
||||
|
||||
use Exception;
|
||||
use Swoole\Coroutine;
|
||||
|
||||
|
||||
@@ -40,4 +41,26 @@ class Client
|
||||
return $this->abstracts->{$name}(...$arguments);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return mixed
|
||||
* @throws Exception
|
||||
*/
|
||||
public function __get(string $name)
|
||||
{
|
||||
// TODO: Implement __get() method.
|
||||
if (method_exists($this, $name)) {
|
||||
return $this->$name();
|
||||
}
|
||||
|
||||
|
||||
if (property_exists($this, $name)) {
|
||||
return $this->$name;
|
||||
}
|
||||
|
||||
throw new Exception('Property|Method "' . $name . '" does not exist.');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user