Piwik\API\Proxy::shouldHideAPIMethod PHP Method

shouldHideAPIMethod() public method

public shouldHideAPIMethod ( $docComment ) : boolean
$docComment
return boolean
    public function shouldHideAPIMethod($docComment)
    {
        $hideLine = strstr($docComment, '@hide');
        if ($hideLine === false) {
            return false;
        }
        $hideLine = trim($hideLine);
        $hideLine .= ' ';
        $token = trim(strtok($hideLine, " "), "\n");
        $hide = false;
        if (!empty($token)) {
            /**
             * This event exists for checking whether a Plugin API class or a Plugin API method tagged
             * with a `@hideXYZ` should be hidden in the API listing.
             *
             * @param bool &$hide whether to hide APIs tagged with $token should be displayed.
             */
            Piwik::postEvent(sprintf('API.DocumentationGenerator.%s', $token), array(&$hide));
        }
        return $hide;
    }