src/Route.php
public function host($host = null, $scheme = '*')
    {
        if (!func_num_args()) {
            return $this->_host;
        }
        if (!is_string($host)) {
            $this->_host = $host;
            return $this;
        }
        if ($host !== '*' || $scheme !== '*') {
            $class = $this->_classes['host'];
            $this->_host = new $class(['scheme' => $scheme, 'pattern' => $host]);
        }
        return $this;
    }
public function host($host = null, $scheme = '*')
    {
        if (!func_num_args()) {
            return $this->_host;
        }
        if (!is_string($host)) {
            $this->_host = $host;
            return $this;
        }
        if ($host !== '*' || $scheme !== '*') {
            $class = $this->_classes['host'];
            $this->_host = new $class(['scheme' => $scheme, 'pattern' => $host]);
        }
        return $this;
    }
Gets/sets the route host.

@param  object      $host The host instance to set or none to get the setted one.
@return object|self       The current host on get or `$this` on set.