This commit is contained in:
2026-07-03 16:07:27 +08:00
parent b96bd159d3
commit ec22ac39a3
+23
View File
@@ -2,6 +2,7 @@
namespace Kiri; namespace Kiri;
use Exception;
use Swoole\Coroutine; use Swoole\Coroutine;
@@ -40,4 +41,26 @@ class Client
return $this->abstracts->{$name}(...$arguments); 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.');
}
} }