RlDateRecurRule.php in Recurring Dates Field 8.2
File
src/Rl/RlDateRecurRule.php
View source
<?php
declare (strict_types=1);
namespace Drupal\date_recur\Rl;
use Drupal\date_recur\DateRecurRuleInterface;
final class RlDateRecurRule implements DateRecurRuleInterface {
protected $parts;
public function __construct(array $parts) {
if (!isset($parts['FREQ'])) {
throw new \Exception('Frequency must be defined.');
}
$this->parts = $parts;
}
public function getFrequency() : string {
return $this->parts['FREQ'];
}
public function getParts() : array {
return $this->parts;
}
}