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
예제 #1
0
파일: API.php 프로젝트: brienomatty/elmsln
 protected function __construct()
 {
     parent::__construct();
     $this->model = new Model();
 }
예제 #2
0
파일: API.php 프로젝트: bnkems/piwik
 public function __construct()
 {
     parent::__construct();
     //instantiate a new user model
     $this->userManagerModel = new UserManagerModel();
 }