Piwik\API\Proxy::loadMethodMetadata PHP Method

loadMethodMetadata() private method

private loadMethodMetadata ( string $class, ReflectionMethod $method )
$class string name of a class
$method ReflectionMethod instance of ReflectionMethod
    private function loadMethodMetadata($class, $method)
    {
        if (!$this->checkIfMethodIsAvailable($method)) {
            return;
        }
        $name = $method->getName();
        $parameters = $method->getParameters();
        $docComment = $method->getDocComment();
        $aParameters = array();
        foreach ($parameters as $parameter) {
            $nameVariable = $parameter->getName();
            $defaultValue = $this->noDefaultValue;
            if ($parameter->isDefaultValueAvailable()) {
                $defaultValue = $parameter->getDefaultValue();
            }
            $aParameters[$nameVariable] = $defaultValue;
        }
        $this->metadataArray[$class][$name]['parameters'] = $aParameters;
        $this->metadataArray[$class][$name]['numberOfRequiredParameters'] = $method->getNumberOfRequiredParameters();
        $this->metadataArray[$class][$name]['isDeprecated'] = false !== strstr($docComment, '@deprecated');
    }