Exemplo n.º 1
0
 /**
  * @param \Carbon\Carbon $day
  */
 public function __construct(Carbon $day)
 {
     $start = clone $day;
     $end = clone $day;
     $start->startOfDay();
     $end->endOfDay();
     parent::__construct($start, $end);
 }
Exemplo n.º 2
0
 /**
  * @param \Carbon\Carbon $month
  */
 public function __construct(Carbon $month)
 {
     $start = clone $month;
     $end = clone $month;
     $start->startOfMonth();
     $end->endOfMonth();
     parent::__construct($start, $end);
 }
Exemplo n.º 3
0
 /**
  * @param \Carbon\Carbon $week
  */
 public function __construct(Carbon $week)
 {
     $start = clone $week;
     $end = clone $week;
     $start->startOfWeek();
     $end->endOfWeek();
     parent::__construct($start, $end);
 }
Exemplo n.º 4
0
 /**
  * @param \Carbon\Carbon $year
  */
 public function __construct(Carbon $year)
 {
     $start = clone $year;
     $end = clone $year;
     $start->startOfYear();
     $end->endOfYear();
     parent::__construct($start, $end);
 }
 /**
  * @param \LW\Statistics\StatisticsProviderInterface $provider
  * @param string $method
  * @param array $args
  * @return string|int|array
  */
 protected function call(StatisticsProviderInterface $provider, $method, $args)
 {
     if ($this->period) {
         $this->period->apply($provider);
     }
     if ($this->interval) {
         return $this->callInterval($provider, $method, $args);
     }
     return call_user_func_array([$provider, $method], $args);
 }