Skip to content

Instantly share code, notes, and snippets.

@spinegar
Last active December 28, 2015 12:49
Show Gist options
  • Select an option

  • Save spinegar/7503426 to your computer and use it in GitHub Desktop.

Select an option

Save spinegar/7503426 to your computer and use it in GitHub Desktop.
Piwik 2.0 Hello World Tutorial - API.php
<?php
/**
* HelloWorld plugin for Piwik 2.0
*
* @author Sean Pinegar
* @link http://seanpinegar.com
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
* @category Piwik_Plugins
* @package HelloWorld
*/
namespace Piwik\Plugins\HelloWorld;
use Piwik\Plugin\API as BaseAPI;
use Piwik\Piwik;
/**
* API for plugin HelloWorld Plugin
*
* @package Piwik_HelloWorld
*/
class API extends BaseAPI
{
/**
* Index API Method
*
* @return string
*/
public function index()
{
return Piwik::translate("HelloWorld_PluginDescription");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment