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:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-01-12 05:51:17 +0300
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-01-12 05:51:17 +0300
commitb133021b751334f5345c7f349811a6de74d27bd1 (patch)
treeba23d53b08eb058c0391bf44b303fd88fc80d5ef /plugins/ExamplePlugin
parenta2f0e87dc6d4d14507518bf34f22773387356529 (diff)
- the root password is now encrypted in the config file
- the API authentication now works for root and for normal user. Simply add a token_auth parameter. see the instruction on the API listing page available from piwik interface - added /fixed stuff in the UI
Diffstat (limited to 'plugins/ExamplePlugin')
-rw-r--r--plugins/ExamplePlugin/API.php30
1 files changed, 25 insertions, 5 deletions
diff --git a/plugins/ExamplePlugin/API.php b/plugins/ExamplePlugin/API.php
index 06d00e30d3..c85ce1a25e 100644
--- a/plugins/ExamplePlugin/API.php
+++ b/plugins/ExamplePlugin/API.php
@@ -1,5 +1,11 @@
<?php
-
+class MagicObject
+{
+ function Incredible(){ return 'Incroyable'; }
+ protected $wonderful = 'magnifique';
+ public $great = 'formidable';
+}
+
class Piwik_ExamplePlugin_API extends Piwik_Apiable
{
static private $instance = null;
@@ -17,10 +23,24 @@ class Piwik_ExamplePlugin_API extends Piwik_Apiable
}
return self::$instance;
}
-
- public function getAnswerToLife()
- {
- return 42;
+
+ public function getAnswerToLife()
+ {
+ return 42;
+ }
+
+ public function getGoldenRatio()
+ {
+ //http://en.wikipedia.org/wiki/Golden_ratio
+ return 1.618033988749894848204586834365;
+ }
+ public function getObject()
+ {
+ return new MagicObject();
+ }
+ public function getNull()
+ {
+ return null;
}
public function getMoreInformationAnswerToLife()