| @@ 365-376 (lines=12) @@ | ||
| 362 | * |
|
| 363 | * @return $this |
|
| 364 | */ |
|
| 365 | public function setByMonth($month) |
|
| 366 | { |
|
| 367 | if (!is_integer($month) || $month < 0 || $month > 12) { |
|
| 368 | throw new InvalidArgumentException('Invalid value for BYMONTH'); |
|
| 369 | } |
|
| 370 | ||
| 371 | $this->byMonth = $month; |
|
| 372 | ||
| 373 | $this->canUseBySetPos = true; |
|
| 374 | ||
| 375 | return $this; |
|
| 376 | } |
|
| 377 | ||
| 378 | /** |
|
| 379 | * The BYWEEKNO rule part specifies a COMMA-separated list of ordinals specifying weeks of the year. |
|
| @@ 461-472 (lines=12) @@ | ||
| 458 | * |
|
| 459 | * @throws \InvalidArgumentException |
|
| 460 | */ |
|
| 461 | public function setByHour($value) |
|
| 462 | { |
|
| 463 | if (!is_integer($value) || $value < 0 || $value > 23) { |
|
| 464 | throw new \InvalidArgumentException('Invalid value for BYHOUR'); |
|
| 465 | } |
|
| 466 | ||
| 467 | $this->byHour = $value; |
|
| 468 | ||
| 469 | $this->canUseBySetPos = true; |
|
| 470 | ||
| 471 | return $this; |
|
| 472 | } |
|
| 473 | ||
| 474 | /** |
|
| 475 | * The BYMINUTE rule part specifies a COMMA-separated list of minutes within an hour. |
|
| @@ 484-495 (lines=12) @@ | ||
| 481 | * |
|
| 482 | * @throws \InvalidArgumentException |
|
| 483 | */ |
|
| 484 | public function setByMinute($value) |
|
| 485 | { |
|
| 486 | if (!is_integer($value) || $value < 0 || $value > 59) { |
|
| 487 | throw new \InvalidArgumentException('Invalid value for BYMINUTE'); |
|
| 488 | } |
|
| 489 | ||
| 490 | $this->byMinute = $value; |
|
| 491 | ||
| 492 | $this->canUseBySetPos = true; |
|
| 493 | ||
| 494 | return $this; |
|
| 495 | } |
|
| 496 | ||
| 497 | /** |
|
| 498 | * The BYSECOND rule part specifies a COMMA-separated list of seconds within a minute. |
|
| @@ 507-518 (lines=12) @@ | ||
| 504 | * |
|
| 505 | * @throws \InvalidArgumentException |
|
| 506 | */ |
|
| 507 | public function setBySecond($value) |
|
| 508 | { |
|
| 509 | if (!is_integer($value) || $value < 0 || $value > 60) { |
|
| 510 | throw new \InvalidArgumentException('Invalid value for BYSECOND'); |
|
| 511 | } |
|
| 512 | ||
| 513 | $this->bySecond = $value; |
|
| 514 | ||
| 515 | $this->canUseBySetPos = true; |
|
| 516 | ||
| 517 | return $this; |
|
| 518 | } |
|
| 519 | } |
|
| 520 | ||