protected function setNewPeriod($interval = '', $interval_count = '', $start = '')
    {
        if (empty($interval)) {
            $interval = $this->plan->interval;
        }

        if (empty($interval_count)) {
            $interval_count = $this->plan->interval_count;
        }

        $period = new Period($interval, $interval_count, $start);

        $this->starts_at = $period->getStartDate();
        $this->ends_at = $period->getEndDate();

        return $this;
    }
protected function setNewPeriod($interval = '', $interval_count = '', $start = '')
    {
        if (empty($interval)) {
            $interval = $this->plan->interval;
        }

        if (empty($interval_count)) {
            $interval_count = $this->plan->interval_count;
        }

        $period = new Period($interval, $interval_count, $start);

        $this->starts_at = $period->getStartDate();
        $this->ends_at = $period->getEndDate();

        return $this;
    }
protected function setNewPeriod ( $ interval = '' , $ interval_count = '' , $ start = '' ) { if ( empty ( $ interval ) ) { $ interval = $ this -> plan -> interval ; } if ( empty ( $ interval_count ) ) { $ interval_count = $ this -> plan -> interval_count ; } $ period = new Period ( $ interval , $ interval_count , $ start ) ; $ this -> starts_at = $ period -> getStartDate ( ) ; $ this -> ends_at = $ period -> getEndDate ( ) ; return $ this ; }
Set subscription period.

@param  string $interval
@param  int $interval_count
@param  string $start Start date
@return  $this
Set subscription period .