/** * Getter * @param string $name Name * @return mixed */ public function __get($name) { if (in_array($name, ['connected', 'hostReal', 'host', 'port'])) { return $this->{$name}; } return parent::__get($name); }
/** * Getter * @param string $name Name * @return mixed */ public function __get($name) { if ($name === 'connected' || $name === 'hostReal' || $name === 'host' || $name === 'port') { return $this->{$name}; } return parent::__get($name); }