Teknik is a suite of services with attractive and functional interfaces. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

API.php 842B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Piwik - free/libre analytics platform
  4. *
  5. * @link http://piwik.org
  6. * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
  7. *
  8. */
  9. namespace Piwik\Plugins\ExampleReport;
  10. use Piwik\DataTable;
  11. use Piwik\DataTable\Row;
  12. /**
  13. * API for plugin ExampleReport
  14. *
  15. * @method static \Piwik\Plugins\ExampleReport\API getInstance()
  16. */
  17. class API extends \Piwik\Plugin\API
  18. {
  19. /**
  20. * Another example method that returns a data table.
  21. * @param int $idSite
  22. * @param string $period
  23. * @param string $date
  24. * @param bool|string $segment
  25. * @return DataTable
  26. */
  27. public function getExampleReport($idSite, $period, $date, $segment = false)
  28. {
  29. $table = new DataTable();
  30. $table->addRowFromArray(array(Row::COLUMNS => array('nb_visits' => 5)));
  31. return $table;
  32. }
  33. }