-
Notifications
You must be signed in to change notification settings - Fork 126
Sabre VObject Parameter
VObject Parameter
This class represents a parameter. A parameter is always tied to a property. In the case of: DTSTART;VALUE=DATE:20101108 VALUE=DATE would be the parameter name and value.
- Class name: Parameter
- Namespace: Sabre\VObject
- Parent class: Sabre\VObject\Node
const REPAIR = 1
public string $name
Parameter name
- Visibility: public
public boolean $noName = false
vCard 2.1 allows parameters to be encoded without a name.
We can deduce the parameter name based on it's value.
- Visibility: public
protected string $value
Parameter value
- Visibility: protected
public \Sabre\VObject\Node $parent
Reference to the parent object, if this is not the top object.
- Visibility: public
protected \Sabre\VObject\ElementList $iterator = null
Iterator override
- Visibility: protected
protected \Sabre\VObject\Component $root
The root document
- Visibility: protected
mixed Sabre\VObject\Parameter::__construct(\Sabre\VObject\Document $root, string $name, string $value)
Sets up the object.
It's recommended to use the create:: factory method instead.
- Visibility: public
- $root Sabre\VObject\Document
- $name string
- $value string
string Sabre\VObject\Parameter::guessParameterNameByValue(string $value)
Try to guess property name by value, can be used for vCard 2.1 nameless parameters.
Figuring out what the name should have been. Note that a ton of these are rather silly in 2014 and would probably rarely be used, but we like to be complete.
- Visibility: public
- This method is static.
- $value string
void Sabre\VObject\Parameter::setValue(string|array $value)
Updates the current value.
This may be either a single, or multiple strings in an array.
- Visibility: public
- $value string|array
string|null Sabre\VObject\Parameter::getValue()
Returns the current value
This method will always return a string, or null. If there were multiple values, it will automatically concatinate them (separated by comma).
- Visibility: public
void Sabre\VObject\Parameter::setParts(array $value)
Sets multiple values for this parameter.
- Visibility: public
- $value array
array Sabre\VObject\Parameter::getParts()
Returns all values for this parameter.
If there were no values, an empty array will be returned.
- Visibility: public
void Sabre\VObject\Parameter::addValue(string|array $part)
Adds a value to this parameter
If the argument is specified as an array, all items will be added to the parameter value list.
- Visibility: public
- $part string|array
boolean Sabre\VObject\Parameter::has(string $value)
Checks if this parameter contains the specified value.
This is a case-insensitive match. It makes sense to call this for for instance the TYPE parameter, to see if it contains a keyword such as 'WORK' or 'FAX'.
- Visibility: public
- $value string
string Sabre\VObject\Node::serialize()
Serializes the node into a mimedir format
- Visibility: public
- This method is abstract.
- This method is defined by Sabre\VObject\Node
array Sabre\VObject\Node::jsonSerialize()
This method returns an array, with the representation as it should be encoded in json. This is used to create jCard or jCal documents.
- Visibility: public
- This method is abstract.
- This method is defined by Sabre\VObject\Node
string Sabre\VObject\Parameter::__toString()
Called when this object is being cast to a string
- Visibility: public
\Sabre\VObject\ElementList Sabre\VObject\Node::getIterator()
Returns the iterator for this object
- Visibility: public
- This method is defined by Sabre\VObject\Node
void Sabre\VObject\Node::setIterator(\Sabre\VObject\ElementList $iterator)
Sets the overridden iterator
Note that this is not actually part of the iterator interface
- Visibility: public
- This method is defined by Sabre\VObject\Node
- $iterator Sabre\VObject\ElementList
array Sabre\VObject\Node::validate(integer $options)
Validates the node for correctness.
The following options are supported: Node::REPAIR - May attempt to automatically repair the problem.
This method returns an array with detected problems. Every element has the following properties:
- level - problem level.
- message - A human-readable string describing the issue.
- node - A reference to the problematic node.
The level means: 1 - The issue was repaired (only happens if REPAIR was turned on) 2 - An inconsequential issue 3 - A severe issue.
- Visibility: public
- This method is defined by Sabre\VObject\Node
- $options integer
integer Sabre\VObject\Node::count()
Returns the number of elements
- Visibility: public
- This method is defined by Sabre\VObject\Node
boolean Sabre\VObject\Node::offsetExists(integer $offset)
Checks if an item exists through ArrayAccess.
This method just forwards the request to the inner iterator
- Visibility: public
- This method is defined by Sabre\VObject\Node
- $offset integer
mixed Sabre\VObject\Node::offsetGet(integer $offset)
Gets an item through ArrayAccess.
This method just forwards the request to the inner iterator
- Visibility: public
- This method is defined by Sabre\VObject\Node
- $offset integer
void Sabre\VObject\Node::offsetSet(integer $offset, mixed $value)
Sets an item through ArrayAccess.
This method just forwards the request to the inner iterator
- Visibility: public
- This method is defined by Sabre\VObject\Node
- $offset integer
- $value mixed
void Sabre\VObject\Node::offsetUnset(integer $offset)
Sets an item through ArrayAccess.
This method just forwards the request to the inner iterator
- Visibility: public
- This method is defined by Sabre\VObject\Node
- $offset integer