Documentation

CalendarQueryValidator
in package

CalendarQuery Validator.

This class is responsible for checking if an iCalendar object matches a set of filters. The main function to do this is 'validate'.

This is used to determine which icalendar objects should be returned for a calendar-query REPORT request.

Tags
copyright

Copyright (C) fruux GmbH (https://fruux.com/)

author

Evert Pot (http://evertpot.com/)

license

http://sabre.io/license/ Modified BSD License

Table of Contents

validate()  : bool
Verify if a list of filters applies to the calendar data object.
validateCompFilters()  : bool
This method checks the validity of comp-filters.
validateParamFilters()  : bool
This method checks the validity of param-filters.
validatePropFilters()  : bool
This method checks the validity of prop-filters.
validateTextMatch()  : bool
This method checks the validity of a text-match.
validateTimeRange()  : bool
Validates if a component matches the given time range.

Methods

validate()

Verify if a list of filters applies to the calendar data object.

public validate(VCalendar $vObject, array<string|int, mixed> $filters) : bool

The list of filters must be formatted as parsed by \Sabre\CalDAV\CalendarQueryParser

Parameters
$vObject : VCalendar
$filters : array<string|int, mixed>
Return values
bool

validateCompFilters()

This method checks the validity of comp-filters.

protected validateCompFilters(Component $parent, array<string|int, mixed> $filters) : bool

A list of comp-filters needs to be specified. Also the parent of the component we're checking should be specified, not the component to check itself.

Parameters
$parent : Component
$filters : array<string|int, mixed>
Return values
bool

validateParamFilters()

This method checks the validity of param-filters.

protected validateParamFilters(Property $parent, array<string|int, mixed> $filters) : bool

A list of param-filters needs to be specified. Also the parent of the parameter we're checking should be specified, not the parameter to check itself.

Parameters
$parent : Property
$filters : array<string|int, mixed>
Return values
bool

validatePropFilters()

This method checks the validity of prop-filters.

protected validatePropFilters(Component $parent, array<string|int, mixed> $filters) : bool

A list of prop-filters needs to be specified. Also the parent of the property we're checking should be specified, not the property to check itself.

Parameters
$parent : Component
$filters : array<string|int, mixed>
Return values
bool

validateTextMatch()

This method checks the validity of a text-match.

protected validateTextMatch(Node|string $check, array<string|int, mixed> $textMatch) : bool

A single text-match should be specified as well as the specific property or parameter we need to validate.

Parameters
$check : Node|string

value to check against

$textMatch : array<string|int, mixed>
Return values
bool

validateTimeRange()

Validates if a component matches the given time range.

protected validateTimeRange(Node $component, DateTime $start, DateTime $end) : bool

This is all based on the rules specified in rfc4791, which are quite complex.

Parameters
$component : Node
$start : DateTime
$end : DateTime
Return values
bool

Search results