PHP Class Recurr\Transformer\ArrayTransformer

If a recurrence rule is infinitely recurring, a virtual limit is imposed.
Author: Shaun Simmons ([email protected])
Show file Open project: simshaun/recurr Class Usage Examples

Protected Properties

Property Type Description
$config Recurr\Transformer\ArrayTransformerConfig
$leapBug boolean ..) does not account for leap years.

Public Methods

Method Description
__construct ( Recurr\Transformer\ArrayTransformerConfig $config = null ) Construct a new ArrayTransformer
setConfig ( Recurr\Transformer\ArrayTransformerConfig $config )
transform ( Rule $rule, Recurr\Transformer\ConstraintInterface $constraint = null, boolean $countConstraintFailures = true ) : Recurr\RecurrenceCollection | Recurr\Recurrence[] Transform a Rule in to an array of \DateTimes

Protected Methods

Method Description
handleExclusions ( array $exclusions, array $recurrences ) : Recurr\Recurrence[]
handleInclusions ( array $inclusions, array $recurrences ) : Recurr\Recurrence[]

Method Details

__construct() public method

Construct a new ArrayTransformer
public __construct ( Recurr\Transformer\ArrayTransformerConfig $config = null )
$config Recurr\Transformer\ArrayTransformerConfig

handleExclusions() protected method

protected handleExclusions ( array $exclusions, array $recurrences ) : Recurr\Recurrence[]
$exclusions array
$recurrences array
return Recurr\Recurrence[]

handleInclusions() protected method

protected handleInclusions ( array $inclusions, array $recurrences ) : Recurr\Recurrence[]
$inclusions array
$recurrences array
return Recurr\Recurrence[]

setConfig() public method

public setConfig ( Recurr\Transformer\ArrayTransformerConfig $config )
$config Recurr\Transformer\ArrayTransformerConfig

transform() public method

Transform a Rule in to an array of \DateTimes
public transform ( Rule $rule, Recurr\Transformer\ConstraintInterface $constraint = null, boolean $countConstraintFailures = true ) : Recurr\RecurrenceCollection | Recurr\Recurrence[]
$rule Recurr\Rule the Rule object
$constraint Recurr\Transformer\ConstraintInterface Potential recurrences must pass the constraint, else they will not be included in the returned collection.
$countConstraintFailures boolean Whether recurrences that fail the constraint's test should count towards a rule's COUNT limit.
return Recurr\RecurrenceCollection | Recurr\Recurrence[]

Property Details

$config protected property

protected ArrayTransformerConfig,Recurr\Transformer $config
return Recurr\Transformer\ArrayTransformerConfig

$leapBug protected property

..) does not account for leap years.
protected bool $leapBug
return boolean