PHP 클래스 Piwik\Plugin\API

Plugins that want to expose functionality through the Reporting API should create a class that extends this one. Every public method in that class that is not annotated with **@ignore** will be callable through Piwik's Web API. _Note: If your plugin calculates and stores reports, they should be made available through the API._ ### Examples **Defining an API for a plugin** class API extends \Piwik\Plugin\API { public function myMethod($idSite, $period, $date, $segment = false) { $dataTable = // ... get some data ... return $dataTable; } } **Linking to an API method** Link
파일 보기 프로젝트 열기: piwik/piwik 1 사용 예제들

공개 메소드들

메소드 설명
getInstance ( ) : static Returns the singleton instance for the derived class. If the singleton instance has not been created, this method will create it.
setSingletonInstance ( $instance ) Sets the singleton instance. For testing purposes.
unsetAllInstances ( ) Used in tests only
unsetInstance ( ) Used in tests only

메소드 상세

getInstance() 공개 정적인 메소드

Returns the singleton instance for the derived class. If the singleton instance has not been created, this method will create it.
public static getInstance ( ) : static
리턴 static

setSingletonInstance() 공개 정적인 메소드

Sets the singleton instance. For testing purposes.
사용 중단:
public static setSingletonInstance ( $instance )

unsetAllInstances() 공개 정적인 메소드

Used in tests only
사용 중단:
public static unsetAllInstances ( )

unsetInstance() 공개 정적인 메소드

Used in tests only
사용 중단:
public static unsetInstance ( )