diff options
author | AlexKlimenkov <shurick.klimenkov@gmail.com> | 2016-03-12 17:13:30 +0300 |
---|---|---|
committer | AlexKlimenkov <shurick.klimenkov@gmail.com> | 2016-03-12 17:13:30 +0300 |
commit | 0b2d678903c2cf2ae375e968850a5e741036bd95 (patch) | |
tree | 16409e11d5592359d510f6626ff787f4d75fe45b /RecurringType.php | |
parent | deba1cc3a92ca397a67ca794d36c224fc193e762 (diff) | |
download | scheduler-helper-php-0b2d678903c2cf2ae375e968850a5e741036bd95.zip scheduler-helper-php-0b2d678903c2cf2ae375e968850a5e741036bd95.tar.gz scheduler-helper-php-0b2d678903c2cf2ae375e968850a5e741036bd95.tar.bz2 |
[fix] no const arrays in php5.4-5.5
Diffstat (limited to 'RecurringType.php')
-rw-r--r-- | RecurringType.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/RecurringType.php b/RecurringType.php index e8be50d..9ad8ca5 100644 --- a/RecurringType.php +++ b/RecurringType.php @@ -22,7 +22,7 @@ class RecurringType { const IS_RECURRING_EXCEPTION = ""; const IS_RECURRING_BREAK = "none"; - const TRANSPOSE_SIZE = array( + private $_transpose_size = array( self::REC_TYPE_DAY => 1, self::REC_TYPE_WEEK => 7, self::REC_TYPE_MONTH => 1, @@ -256,7 +256,7 @@ class RecurringType { $type = $this->getRecurringTypeValue(); //If recurring type is "year" then exit, else add months. if ($type == self::REC_TYPE_DAY || $type == self::REC_TYPE_WEEK) { - $step = self::TRANSPOSE_SIZE[$type] * $this->getRecurringTypeStepValue(); + $step = $this->_transpose_size[$type] * $this->getRecurringTypeStepValue(); $day = 24 * 60 * 60; $delta = floor(($intervalStartDateStamp - $recurringStartDateStamp) / ($day * $step)); if ($delta > 0) |