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:
authormattab <matthieu.aubry@gmail.com>2014-05-02 04:25:54 +0400
committermattab <matthieu.aubry@gmail.com>2014-05-02 04:25:54 +0400
commit952b8aa56013d8d6d2a262f62bc3291a98c46704 (patch)
tree345200e2b714ef24226d25125ae62ed0b2240db2 /core/Period.php
parentd88b13b75b3bd58d2a2f283602da80ec0714b69f (diff)
refs #5065 add back the factory() method for backward compat
Diffstat (limited to 'core/Period.php')
-rw-r--r--core/Period.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/Period.php b/core/Period.php
index f224dfc326..8ec4bf3345 100644
--- a/core/Period.php
+++ b/core/Period.php
@@ -10,6 +10,7 @@ namespace Piwik;
use Exception;
use Piwik\Period\Day;
+use Piwik\Period\Factory;
use Piwik\Period\Month;
use Piwik\Period\Week;
use Piwik\Period\Year;
@@ -61,6 +62,17 @@ abstract class Period
}
/**
+ * @deprecated
+ * @param $period
+ * @param $date
+ * @return Period
+ */
+ public static function factory($period, $date)
+ {
+ return Factory::build($period, $date);
+ }
+
+ /**
* Returns true if `$dateString` and `$period` represent multiple periods.
*
* Will return true for date/period combinations where date references multiple