-1) { $this->abstracts = new CoroutineClient($host, $port, $isSsl); } else { $this->abstracts = new CurlClient($host, $port, $isSsl); } } /** * @param string $name * @param array $arguments * @return mixed */ public function __call(string $name, array $arguments) { return $this->abstracts->{$name}(...$arguments); } /** * @param string $name * @return mixed * @throws Exception */ public function __get(string $name) { // TODO: Implement __get() method. $getter = 'get' . ucfirst($name); if (method_exists($this, $getter)) { return $this->$getter(); } else if (method_exists($this, $name)) { return $this->$name(); } else if (property_exists($this, $name)) { return $this->$name; } else { throw new Exception('Property|Method "' . $name . '" does not exist.'); } } }