Skip to content

Commit

Permalink
refs #5065 add back the factory() method for backward compat
Browse files Browse the repository at this point in the history
  • Loading branch information
mattab committed May 2, 2014
1 parent d88b13b commit 952b8aa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/Period.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use Exception;
use Piwik\Period\Day;
use Piwik\Period\Factory;
use Piwik\Period\Month;
use Piwik\Period\Week;
use Piwik\Period\Year;
Expand Down Expand Up @@ -60,6 +61,17 @@ public function __construct(Date $date)
$this->date = clone $date;
}

/**
* @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.
*
Expand Down

0 comments on commit 952b8aa

Please sign in to comment.