Ogone\AbstractRequest::__call PHP 메소드

__call() 공개 메소드

Allows setting ogone parameters that don't have a setter -- usually only the unimportant ones like bgcolor, which you'd call with setBgcolor()
public __call ( $method, $args )
$method
$args
    public function __call($method, $args)
    {
        if (substr($method, 0, 3) == 'set') {
            $field = strtolower(substr($method, 3));
            if (in_array($field, $this->ogoneFields)) {
                $this->parameters[$field] = $args[0];
                return;
            }
        }
        if (substr($method, 0, 3) == 'get') {
            $field = strtolower(substr($method, 3));
            if (array_key_exists($field, $this->parameters)) {
                return $this->parameters[$field];
            }
        }
        throw new BadMethodCallException("Unknown method {$method}");
    }