CardDAV Client Library

ParamFilter
in package
implements XmlSerializable

Represents XML urn:ietf:params:xml:ns:carddav:param-filter elements as PHP objects (RFC 6352).

From RFC 6352: The CARDDAV:param-filter XML element specifies search criteria on a specific vCard property parameter (e.g., TYPE) in the scope of a given CARDDAV:prop-filter. A vCard property is said to match a CARDDAV:param-filter if:

  • A parameter of the type specified by the "name" attribute exists, and the CARDDAV:param-filter is empty, or it matches the CARDDAV:text-match conditions if specified. or:
  • A parameter of the type specified by the "name" attribute does not exist, and the CARDDAV:is-not-defined element is specified.
<!ELEMENT param-filter (is-not-defined | text-match)?>
<!ATTLIST param-filter name CDATA #REQUIRED>
  <!-- name value: a property parameter name (e.g., "TYPE") -->

Interfaces, Classes and Traits

XmlSerializable

Table of Contents

$filter  : TextMatch|null
Filter condition. Null to match if the parameter is not defined.
$param  : string
Parameter this filter matches on (e.g. TYPE).
__construct()  : mixed
Constructs a ParamFilter element.
xmlAttributes()  : array<string, string>
Produces a list of attributes for this filter suitable to pass to a Sabre XML Writer.
xmlSerialize()  : void
This function encodes the element's value (not the element itself!) to the given XML writer.
xmlSerializeElement()  : void
This function serializes the full element to the given XML writer.

Properties

$filter

Filter condition. Null to match if the parameter is not defined.

public TextMatch|null $filter
Tags
psalm-readonly

$param

Parameter this filter matches on (e.g. TYPE).

public string $param
Tags
psalm-readonly

Methods

__construct()

Constructs a ParamFilter element.

public __construct(string $param, string|null $matchSpec) : mixed
Parameters
$param : string

The name of the parameter to match for

$matchSpec : string|null

The match specifier. Null to match for non-existence of the parameter, otherwise a match specifier for TextMatch.

Return values
mixed

xmlAttributes()

Produces a list of attributes for this filter suitable to pass to a Sabre XML Writer.

public xmlAttributes() : array<string, string>
Return values
array<string, string>

A list of attributes (attrname => attrvalue)

xmlSerialize()

This function encodes the element's value (not the element itself!) to the given XML writer.

public xmlSerialize(Writer $writer) : void
Parameters
$writer : Writer
Return values
void

xmlSerializeElement()

This function serializes the full element to the given XML writer.

public xmlSerializeElement(Writer $writer) : void
Parameters
$writer : Writer
Return values
void

Search results