lithium\data\source\Http::__call PHP Method

__call() public method

Pass methods to service connection. Path and method are determined from Http::$_method. If not set, a GET request with the $method as the path will be used.
See also: lithium\data\source\Http::$_method
public __call ( string $method, array $params ) : mixed
$method string
$params array
return mixed
    public function __call($method, $params)
    {
        if (!isset($this->_methods[$method])) {
            if (method_exists($this->connection, $method)) {
                return $this->connection->invokeMethod($method, $params);
            }
            $this->_methods[$method] = array('path' => "/{$method}");
        }
        $params += array(array(), array());
        if (!is_object($params[0])) {
            $config = (array) $params[0];
            if (count($config) === count($config, COUNT_RECURSIVE)) {
                $config = array('data' => $config);
            }
            $params[0] = new Query($this->_methods[$method] + $config);
        }
        $params[0] = new Query($params[0]->export($this) + $this->_methods[$method]);
        return $this->_filter(__CLASS__ . "::" . $method, $params, function ($self, $params) {
            list($query, $options) = $params;
            return $self->send($query, $options);
        });
    }