Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ExampleAPI/API.php')
-rw-r--r--plugins/ExampleAPI/API.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/plugins/ExampleAPI/API.php b/plugins/ExampleAPI/API.php
index 214d73eac5..a6c012a644 100644
--- a/plugins/ExampleAPI/API.php
+++ b/plugins/ExampleAPI/API.php
@@ -8,9 +8,11 @@
* @category Piwik_Plugins
* @package Piwik_ExampleAPI
*/
+namespace Piwik\Plugins\ExampleAPI;
+
+use Piwik\DataTable;
use Piwik\DataTable\Row;
use Piwik\Piwik;
-use Piwik\DataTable;
use Piwik\Version;
/**
@@ -19,7 +21,7 @@ use Piwik\Version;
* Please see the <a href='http://dev.piwik.org/trac/browser/trunk/plugins/ExampleAPI/API.php#L1' target='_blank'>source code in in the file plugins/ExampleAPI/API.php</a> for more documentation.
* @package Piwik_ExampleAPI
*/
-class Piwik_ExampleAPI_API
+class API
{
/**
* * This is an example of a basic API file. Each plugin can have one public API.
@@ -38,14 +40,14 @@ class Piwik_ExampleAPI_API
*
* It is highly recommended that all the plugin logic is done inside API implementations, and the
* Controller and other objects would all call the API internally using, eg.
- * Piwik_ExampleAPI_API::getInstance()->getSum(1, 2);
+ * API::getInstance()->getSum(1, 2);
*
*/
static private $instance = null;
/**
* Singleton
- * @return Piwik_ExampleAPI_API
+ * @return \Piwik\Plugins\ExampleAPI\API
*/
static public function getInstance()
{
@@ -80,11 +82,11 @@ class Piwik_ExampleAPI_API
* If used internally, the data structure can be returned untouched by using
* the API parameter 'format=original'
*
- * @return Piwik_MagicObject Will return a standard Piwik error when called from the Web APIs
+ * @return MagicObject Will return a standard Piwik error when called from the Web APIs
*/
public function getObject()
{
- return new Piwik_MagicObject();
+ return new MagicObject();
}
/**
@@ -180,9 +182,9 @@ class Piwik_ExampleAPI_API
/**
* Magic Object
*
- * @package Piwik_ExamplePlugin
+ * @package ExamplePlugin
*/
-class Piwik_MagicObject
+class MagicObject
{
function Incredible()
{
@@ -191,4 +193,4 @@ class Piwik_MagicObject
protected $wonderful = 'magnifique';
public $great = 'formidable';
-}
+} \ No newline at end of file