protected function setParameter($methodName, array $methodArguments)
    {
        $parameterClass = substr($methodName, 3);

        $fullParameterClass = $this->getFullParameterClass($parameterClass, $methodName);

        $parameterIndex = $this->getIndexFromArguments($methodArguments);

        /** @var SingleParameter $parameterObject */
        $parameterObject = new $fullParameterClass($parameterIndex);

        if (!isset($methodArguments[0])) {
            throw new \InvalidArgumentException(
                'For Analytics object, you must specify a value to be set for ' . $methodName
            );
        } else {
            $parameterObject->setValue($methodArguments[0]);
        }

        $this->singleParameters[$parameterObject->getName()] = $parameterObject;

        return $this;
    }
protected function setParameter($methodName, array $methodArguments)
    {
        $parameterClass = substr($methodName, 3);

        $fullParameterClass = $this->getFullParameterClass($parameterClass, $methodName);

        $parameterIndex = $this->getIndexFromArguments($methodArguments);

        /** @var SingleParameter $parameterObject */
        $parameterObject = new $fullParameterClass($parameterIndex);

        if (!isset($methodArguments[0])) {
            throw new \InvalidArgumentException(
                'For Analytics object, you must specify a value to be set for ' . $methodName
            );
        } else {
            $parameterObject->setValue($methodArguments[0]);
        }

        $this->singleParameters[$parameterObject->getName()] = $parameterObject;

        return $this;
    }
protected function setParameter ( $ methodName , array $ methodArguments ) { $ parameterClass = substr ( $ methodName , 3 ) ; $ fullParameterClass = $ this -> getFullParameterClass ( $ parameterClass , $ methodName ) ; $ parameterIndex = $ this -> getIndexFromArguments ( $ methodArguments ) ; /** @var SingleParameter $parameterObject */ $ parameterObject = new $ fullParameterClass ( $ parameterIndex ) ; if ( ! isset ( $ methodArguments [ 0 ] ) ) { throw new \ InvalidArgumentException ( 'For Analytics object, you must specify a value to be set for ' . $ methodName ) ; } else { $ parameterObject -> setValue ( $ methodArguments [ 0 ] ) ; } $ this -> singleParameters [ $ parameterObject -> getName ( ) ] = $ parameterObject ; return $ this ; }
Sets the value for a parameter.

@param $methodName
@param array $methodArguments
@return $this
@throws \InvalidArgumentException
Sets the value for a parameter .