@param string $methodName

@return DICallWrapper
@throws MissingUpdateCallException
553986
private function getCall(string $methodName): DICallWrapper
    {
        if (array_key_exists($this::CALLS_SECTION, $this->serviceArray)) {
            foreach ($this->serviceArray[$this::CALLS_SECTION] as $callArray) {
                $call = new DICallWrapper($callArray);
                if ($call->getMethodName() === $methodName) {
                    return $call;
                }
            }
        }
        throw new MissingUpdateCallException();
    }
912358
public function invoke($methodName, array $arguments = [])
    {
        $this->trigger(self::EVENT_BEFORE_METHOD);
        $result = call_user_func_array([$this->o, $methodName], $arguments);
        $this->trigger(self::EVENT_AFTER_METHOD);
        return $result;
    }
385767
public function removeByName($methodName)
    {
        $removedList = new self();
        $list = $this->getIterator();
        foreach ($list as $index => $method) {
            if ((is_array($methodName) && in_array($method->getName(), $methodName))
                || ($method->getName() === $methodName)
            ) {
                $removedList->add($method);
                $this->remove($index);
            }
        }

        return $removedList;
    }
674367
public function hasAnnotation($name, $methodName = NULL)
	{
		return NULL !== Annotations::hasAnnotation($name, $this, $methodName);
	}
1317229
function getMethod($methodName)
    {
        if (!$this->hasMethod($methodName))
            throw new \Exception(sprintf(
                'Method (%s) not found.'
                , $methodName
            ));

        if (isset($this->_t__methods[$methodName])) {
            ## from bind closure
            $methodCallable = $this->_t__methods[$methodName];
        } else {
            $bindTo = $this->getBindTo();
            $methodCallable = function() use($methodName, $bindTo) {
                return call_user_func_array([$bindTo, $methodName], func_get_args());
            };
        }

        ## bind it into latest bind object
        $methodCallable = \Closure::bind(
            $methodCallable
            , $this->getBindTo()
            , get_class($this->getBindTo())
        );

        return $methodCallable;
    }
1264539
protected function getMethodReflection($className, $methodName)
    {
        $this->dataCacheNeedsUpdate = true;
        if (!isset($this->methodReflections[$className][$methodName])) {
            $this->methodReflections[$className][$methodName] = new MethodReflection($className, $methodName);
        }
        return $this->methodReflections[$className][$methodName];
    }
1076365
public function hasMethod($methodName)
    {
        return \method_exists($this, $methodName) || \method_exists($this, $this->public_function_prefix . $methodName);
    }
693207
public function method($field, $methodName = null)
    {
        if (!$methodName) {
            $methodName = $field;
        }

        if (!is_string($field)) {
            throw new GenericException('Must be a string!');
        }
        if (!is_string($methodName)) {
            throw new GenericException('Must be a string!');
        }

        $this->fields[ $field ] = [
            'type'   => self::TYPE_METHOD,
            'method' => $methodName
        ];

        return $this;
    }
1312854
public function method(string $methodName): PropertyColumnDefiner
    {
        return new PropertyColumnDefiner($this, null, function (Column $column) use ($methodName) {
            $this->methodColumnMap[$methodName] = $column->getName();
            $this->addColumn($column);
        });
    }
785161
private function checkMethodExists($className, $methodName)
    {
        if (!$this->isMethodAvailable($className, $methodName)) {
            throw new Exception(Piwik::translate('General_ExceptionMethodNotFound', array($methodName, $className)));
        }
    }
193918
protected static function isAjaxMethod($methodName)
    {
        $suffixLength = strlen(self::AJAX_METHOD_NAME_SUFFIX);

        return strlen($methodName) > $suffixLength
            && self::AJAX_METHOD_NAME_SUFFIX === substr($methodName, -1 * $suffixLength);
    }
237091
public function getCallable($methodName)
    {
        $this->checkMethodName($methodName);

        $class = $this->getClassName($methodName);
        $method = $this->getMethodName($methodName);

        $object = $this->createObject($class);

        if (!method_exists($object, $method)) {
            throw new JsonRpc\Exception\Method();
        }

        return array($object, $method);
    }
384382
protected function buildCallParentMethodCode($fullClassName, $methodName)
    {
        if (!$this->reflectionService->hasMethod($fullClassName, $methodName)) {
            return '';
        }
        if (count($this->reflectionService->getMethodParameters($this->fullOriginalClassName, $this->methodName)) > 0) {
            return "        call_user_func_array('parent::" . $methodName . "', \$arguments);\n";
        } else {
            return "        parent::" . $methodName . "();\n";
        }
    }
414622
public function setNotificationMethod($methodName)
    {
        if (trim($methodName) == '') {
            $methodName = self::NOTIFY_MAIL;
        }

        $this->notificationMethod = $methodName;
    }
31779
public function callMethod($methodName, $options)
    {
        $this->error = false;
        if (null === ($options = $this->getMethodParameters($methodName, $options))) {
            $this->error = true;
            return null;
        }

        return call_user_func_array(array($this, $methodName), $options);
    }
566571
protected function generateMethod($methodName)
    {
        $methodReflection = $this->_method[$methodName];

        $docBlock = new DocBlockGenerator();
        $docBlock->setShortDescription("Delicate $methodName() to __call() method ");

        if ($methodReflection->getDocComment()) {
            $docBlockReflection = new DocBlockReflection($methodReflection);
            $docBlock->fromReflection($docBlockReflection);
        }

        $method = new MethodGenerator();
        $method->setName($methodName);
        $method->setDocBlock($docBlock);
        $method->setBody(sprintf(self::METHOD_TEMPLATE, $methodName));

        if ($methodReflection->isPublic()) {
            $method->setVisibility(MethodGenerator::VISIBILITY_PUBLIC);
        } else if ($methodReflection->isProtected()) {
            $method->setVisibility(MethodGenerator::VISIBILITY_PROTECTED);
        } else if ($methodReflection->isPrivate()) {
            $method->setVisibility(MethodGenerator::VISIBILITY_PRIVATE);
        }

        foreach ($methodReflection->getParameters() as $parameter) {

            $parameterGenerator = new ParameterGenerator();
            $parameterGenerator->setPosition($parameter->getPosition());
            $parameterGenerator->setName($parameter->getName());
            $parameterGenerator->setPassedByReference($parameter->isPassedByReference());

            if ($parameter->isDefaultValueAvailable()) {
                $parameterGenerator->setDefaultValue($parameter->getDefaultValue());
            }
            if ($parameter->isArray()) {
                $parameterGenerator->setType('array');
            }
            if ($typeClass = $parameter->getClass()) {
                $parameterGenerator->setType($typeClass->getName());
            }

            $method->setParameter($parameterGenerator);
        }
        $this->addMethodFromGenerator($method);
    }
257135
private static function collectAround(string $className, string $methodName)
    {
        if (!isset(self::$aspects[$className])) {
            return null;
        }

        self::$aspects[$className]['advice']['around'] = [$className, $methodName];
    }