RlDateRecurRule.php in Recurring Dates Field 3.x
Same filename and directory in other branches
Namespace
Drupal\date_recur\RlFile
src/Rl/RlDateRecurRule.phpView source
<?php
declare (strict_types=1);
namespace Drupal\date_recur\Rl;
use Drupal\date_recur\DateRecurRuleInterface;
/**
* RRule object.
*
* @ingroup RLanvinPhpRrule
*/
final class RlDateRecurRule implements DateRecurRuleInterface {
/**
* The parts for this rule.
*
* @var array
*/
protected $parts;
/**
* Creates a new RlDateRecurRule.
*
* @internal constructor subject to change at any time. Creating
* RlDateRecurRule objects is reserved by date_recur module.
*/
public function __construct(array $parts) {
if (!isset($parts['FREQ'])) {
throw new \Exception('Frequency must be defined.');
}
$this->parts = $parts;
}
/**
* {@inheritdoc}
*/
public function getFrequency() : string {
return $this->parts['FREQ'];
}
/**
* {@inheritdoc}
*/
public function getParts() : array {
return $this->parts;
}
}
Classes
Name![]() |
Description |
---|---|
RlDateRecurRule | RRule object. |