PHP Класс Piwik\API\DocumentationGenerator

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$countPluginsLoaded

Открытые методы

Метод Описание
__construct ( ) trigger loading all plugins with an API.php file in the Proxy
addExamples ( $class, $methodName, $prefixUrls )
checkDocumentation ( $moduleToCheck ) : mixed Check if documentation contains @hide annotation and deletes it
checkIfClassCommentContainsHideAnnotation ( ReflectionClass $rClass ) : boolean Check if Class contains @hide
getAllInterfaceString ( boolean $outputExampleUrls = true, string $prefixUrls = '' ) : string Returns a HTML page containing help for all the successfully loaded APIs.
getExampleUrl ( string $class, string $methodName, array $parametersToSet = [] ) : string | boolean Returns a string containing links to examples on how to call a given method on a given API It will export links to XML, CSV, HTML, JSON, PHP, etc.
getParametersString ( string $class, string $name ) : string Returns the methods $class.$name parameters (and default value if provided) as a string.
prepareMethodToDisplay ( $moduleName, $info, $methods, $class, $outputExampleUrls, $prefixUrls )
prepareModuleToDisplay ( $moduleName )
prepareModulesAndMethods ( $info, $moduleName )

Приватные методы

Метод Описание
checkIfCommentContainsInternalAnnotation ( ReflectionClas\ReflectionClass | ReflectionMethod $rClass ) : boolean Check if Class contains @internal
getInterfaceString ( $moduleName, $class, $info, $parametersToSet, $outputExampleUrls, $prefixUrls )
getMethodString ( $moduleName, $class, $parametersToSet, $outputExampleUrls, $prefixUrls, $methodName )

Описание методов

__construct() публичный Метод

trigger loading all plugins with an API.php file in the Proxy
public __construct ( )

addExamples() публичный Метод

public addExamples ( $class, $methodName, $prefixUrls )

checkDocumentation() публичный Метод

Check if documentation contains @hide annotation and deletes it
public checkDocumentation ( $moduleToCheck ) : mixed
$moduleToCheck
Результат mixed

checkIfClassCommentContainsHideAnnotation() публичный Метод

Check if Class contains @hide
public checkIfClassCommentContainsHideAnnotation ( ReflectionClass $rClass ) : boolean
$rClass ReflectionClass instance of ReflectionMethod
Результат boolean

getAllInterfaceString() публичный Метод

For each module it will return a mini help with the method names, parameters to give, links to get the result in Xml/Csv/etc
public getAllInterfaceString ( boolean $outputExampleUrls = true, string $prefixUrls = '' ) : string
$outputExampleUrls boolean
$prefixUrls string
Результат string

getExampleUrl() публичный Метод

It will not export links for methods such as deleteSite or deleteUser
public getExampleUrl ( string $class, string $methodName, array $parametersToSet = [] ) : string | boolean
$class string the class
$methodName string the method
$parametersToSet array parameters to set
Результат string | boolean when not possible

getParametersString() публичный Метод

Returns the methods $class.$name parameters (and default value if provided) as a string.
public getParametersString ( string $class, string $name ) : string
$class string The class name
$name string The method name
Результат string For example "(idSite, period, date = 'today')"

prepareMethodToDisplay() публичный Метод

public prepareMethodToDisplay ( $moduleName, $info, $methods, $class, $outputExampleUrls, $prefixUrls )

prepareModuleToDisplay() публичный Метод

public prepareModuleToDisplay ( $moduleName )

prepareModulesAndMethods() публичный Метод

public prepareModulesAndMethods ( $info, $moduleName )

Описание свойств

$countPluginsLoaded защищенное свойство

protected $countPluginsLoaded