TheIconic\Tracking\GoogleAnalytics\Analytics::__call PHP Method

__call() public method

Routes the method call to the adequate private method.
public __call ( $methodName, array $methodArguments ) : mixed
$methodName
$methodArguments array
return mixed
    public function __call($methodName, array $methodArguments)
    {
        $methodName = $this->fixTypos($methodName);
        if (preg_match('/^set(Product|Promotion)ActionTo(\\w+)/', $methodName, $matches)) {
            return $this->setParameterActionTo($matches[1], $matches[2]);
        }
        if (preg_match('/^(set)(\\w+)/', $methodName, $matches)) {
            return $this->setParameter($methodName, $methodArguments);
        }
        if (preg_match('/^(add)(\\w+)/', $methodName, $matches)) {
            return $this->addItem($methodName, $methodArguments);
        }
        if (preg_match('/^(send)(\\w+)/', $methodName, $matches)) {
            return $this->sendHit($methodName);
        }
        // Get Parameters
        if (preg_match('/^(get)(\\w+)/', $methodName, $matches)) {
            return $this->getParameter($methodName, $methodArguments);
        }
        throw new \BadMethodCallException('Method ' . $methodName . ' not defined for Analytics class');
    }