Automattic\Wistia\Traits\ApiMethodsTrait::__call PHP Method

__call() public method

Call a defined method
public __call ( string $method, array $params ) : array
$method string
$params array
return array
    public function __call($method, $params)
    {
        if (null === ($signature = $this->_get_method_signature($method))) {
            throw new BadMethodCallException('Method ' . $method . ' not found on ' . get_class() . '.', 500);
        }
        preg_match_all('/\\%/', $signature[1], $replacements);
        $replacement_count = isset($replacements[0]) ? count($replacements[0]) : 0;
        $replacement_params = array_splice($params, 0, $replacement_count);
        array_unshift($replacement_params, $signature[1]);
        $path = call_user_func_array('sprintf', $replacement_params);
        array_unshift($params, $path);
        return call_user_func_array([$this->get_client(), $signature[0]], $params);
    }