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:
authormattpiwik <matthieu.aubry@gmail.com>2008-06-21 06:53:52 +0400
committermattpiwik <matthieu.aubry@gmail.com>2008-06-21 06:53:52 +0400
commit16e31d2bdd7c45528a99e3030072e14fe68ade02 (patch)
tree7e347e466ee219bcc082ceb6d2a3ffb7a719df51 /modules/LogStats.php
parentb72536f57fcb378182588e1746a092439f782325 (diff)
- adding hooks in LogStats modules, see http://dev.piwik.org/trac/wiki/Plugins/Hooks
git-svn-id: http://dev.piwik.org/svn/trunk@524 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'modules/LogStats.php')
-rw-r--r--modules/LogStats.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/modules/LogStats.php b/modules/LogStats.php
index 2d084c985b..fe059138b2 100644
--- a/modules/LogStats.php
+++ b/modules/LogStats.php
@@ -190,7 +190,20 @@ class Piwik_LogStats
*/
protected function getNewVisitObject()
{
- return new Piwik_LogStats_Visit(self::$db);
+ $visit = null;
+ Piwik_PostEvent('LogStats.getNewVisitObject', $visit);
+
+ if(is_null($visit))
+ {
+ $visit = new Piwik_LogStats_Visit();
+ }
+ elseif(!($visit instanceof Piwik_LogStats_Visit_Interface ))
+ {
+ throw new Exception("The Visit object set in the plugin must implement Piwik_LogStats_Visit_Interface");
+ }
+
+ $visit->setDb(self::$db);
+ return $visit;
}
// main algorithm