|
| __construct ($propstring=null, &$refData=null) |
|
| initFromIterator (&$iterator, $begin=-1) |
|
| getIterator () |
|
| initFromText (&$plainText) |
|
| rewind () |
|
| explode () |
|
| close () |
|
| parseFrom (&$iterator) |
|
| ComponentCount () |
|
| propertiesCount () |
|
| getComponentAt ($position) |
|
| getPropertyAt ($position) |
|
| clearPropertyAt ($position) |
|
| GetType () |
|
| SetType ( $type) |
|
| CollectParameterValues ( $parameter_name) |
|
| GetProperty ( $type) |
|
| GetPValue ( $type) |
|
| GetProperties ( $type=null) |
|
| GetPropertiesByPath ( $path) |
|
| ClearProperties ( $type=null) |
|
| SetProperties ( $new_properties, $type=null) |
|
| AddProperty ( $new_property, $value=null, $parameters=null) |
|
| GetComponents ( $type=null, $normal_match=true) |
|
| ClearComponents ( $type=null) |
|
| SetComponents ( $new_component, $type=null) |
|
| AddComponent ( $new_component) |
|
| MaskComponents ( $keep, $recursive=true) |
|
| MaskProperties ( $keep, $component_list=null) |
|
| WrapComponent ( $content) |
|
| UnwrapComponent (&$content) |
|
| Render ($restricted_properties=null, $force_rendering=false) |
|
| isValid () |
|
| TestFilter ( $filters) |
|
| __construct (&$master=null) |
|
| setMaster ($master) |
|
| getMaster () |
|
Definition at line 21 of file vComponent.php.
◆ __construct()
vComponent::__construct |
( |
|
$propstring = null , |
|
|
& |
$refData = null |
|
) |
| |
◆ AddComponent()
vComponent::AddComponent |
( |
|
$new_component | ) |
|
Adds a new subcomponent
- Parameters
-
vComponent | $new_component | The new component to append to the set |
Definition at line 666 of file vComponent.php.
◆ AddProperty()
vComponent::AddProperty |
( |
|
$new_property, |
|
|
|
$value = null , |
|
|
|
$parameters = null |
|
) |
| |
Adds a new property
- Parameters
-
vProperty | $new_property | The new property to append to the set, or a string with the name |
string | $value | The value of the new property (default: param 1 is an vProperty with everything |
array | $parameters | The key/value parameter pairs (default: none, or param 1 is an vProperty with everything) |
Definition at line 550 of file vComponent.php.
◆ ClearComponents()
vComponent::ClearComponents |
( |
|
$type = null | ) |
|
Clear all components, or the components matching a particular type
- Parameters
-
string | $type | The type of component - omit for all components |
Definition at line 609 of file vComponent.php.
◆ ClearProperties()
vComponent::ClearProperties |
( |
|
$type = null | ) |
|
Clear all properties, or the properties matching a particular type
- Parameters
-
string | array | $type | The type of property - omit for all properties - or an array associating property names with true values: array( 'PROPERTY' => true, 'PROPERTY2' => true ) |
Definition at line 509 of file vComponent.php.
◆ clearPropertyAt()
vComponent::clearPropertyAt |
( |
|
$position | ) |
|
◆ close()
◆ CollectParameterValues()
vComponent::CollectParameterValues |
( |
|
$parameter_name | ) |
|
Collect an array of all parameters of our properties which are the specified type Mainly used for collecting the full variety of references TZIDs
Definition at line 356 of file vComponent.php.
◆ ComponentCount()
vComponent::ComponentCount |
( |
| ) |
|
◆ explode()
fill arrays with components and properties if they are empty.
basicaly the object are just pointer to memory with input data (iterator with seek address on start and end) but when you want get information of any components or properties is necessary call this function first
- See also
- GetComponents(), ComponentsCount(), GetProperties(), PropertiesCount()
Definition at line 163 of file vComponent.php.
◆ getComponentAt()
vComponent::getComponentAt |
( |
|
$position | ) |
|
- Parameters
-
- Returns
- null - whet is position out of range
Definition at line 296 of file vComponent.php.
◆ GetComponents()
vComponent::GetComponents |
( |
|
$type = null , |
|
|
|
$normal_match = true |
|
) |
| |
Get all sub-components, or at least get those matching a type, or failling to match, should the second parameter be set to false. Component types may be a string or an array associating property names with true values: array( 'TYPE' => true, 'TYPE2' => true )
- Parameters
-
mixed | $type | The type(s) to match (default: All) |
boolean | $normal_match | Set to false to invert the match (default: true) |
- Returns
- array an array of the sub-components
Definition at line 581 of file vComponent.php.
◆ getIterator()
vComponent::getIterator |
( |
| ) |
|
◆ GetProperties()
vComponent::GetProperties |
( |
|
$type = null | ) |
|
Get all properties, or the properties matching a particular type, or matching an array associating property names with true values: array( 'PROPERTY' => true, 'PROPERTY2' => true )
Definition at line 411 of file vComponent.php.
◆ GetPropertiesByPath()
vComponent::GetPropertiesByPath |
( |
|
$path | ) |
|
Return an array of properties matching the specified path
- Returns
- array An array of vProperty within the tree which match the path given, in the form [/]COMPONENT[/...]/PROPERTY in a syntax kind of similar to our poor man's XML queries. We also allow COMPONENT and PROPERTY to be !COMPONENT and !PROPERTY for ++fun.
- Note
- At some point post PHP4 this could be re-done with an iterator, which should be more efficient for common use cases.
There is more to the path, so we recurse into that sub-part
Our input $path was not rooted, so we recurse further
Definition at line 457 of file vComponent.php.
◆ GetProperty()
vComponent::GetProperty |
( |
|
$type | ) |
|
Return the first instance of a property of this name
So we can call methods on the result of this, make sure we always return a vProperty of some kind
Definition at line 382 of file vComponent.php.
◆ getPropertyAt()
vComponent::getPropertyAt |
( |
|
$position | ) |
|
◆ GetPValue()
vComponent::GetPValue |
( |
|
$type | ) |
|
Return the value of the first instance of a property of this name, or null
Definition at line 399 of file vComponent.php.
◆ GetType()
Return the type of component which this is
Definition at line 335 of file vComponent.php.
◆ initFromIterator()
vComponent::initFromIterator |
( |
& |
$iterator, |
|
|
|
$begin = -1 |
|
) |
| |
◆ initFromText()
vComponent::initFromText |
( |
& |
$plainText | ) |
|
◆ isValid()
◆ MaskComponents()
vComponent::MaskComponents |
( |
|
$keep, |
|
|
|
$recursive = true |
|
) |
| |
Mask components, removing any that are not of the types in the list
- Parameters
-
array | $keep | An array of component types to be kept |
boolean | $recursive | (default true) Whether to recursively MaskComponents on the ones we find |
Definition at line 699 of file vComponent.php.
◆ MaskProperties()
vComponent::MaskProperties |
( |
|
$keep, |
|
|
|
$component_list = null |
|
) |
| |
Mask properties, removing any that are not in the list
- Parameters
-
array | $keep | An array of property names to be kept |
array | $component_list | An array of component types to check within |
Definition at line 723 of file vComponent.php.
◆ parseFrom()
vComponent::parseFrom |
( |
& |
$iterator | ) |
|
◆ propertiesCount()
vComponent::propertiesCount |
( |
| ) |
|
◆ Render()
vComponent::Render |
( |
|
$restricted_properties = null , |
|
|
|
$force_rendering = false |
|
) |
| |
render object to string with wraped lines
- Parameters
-
null | $restricted_properties | |
bool | $force_rendering | |
- Returns
- string - rendered object
Definition at line 899 of file vComponent.php.
◆ RenderWithoutWrap()
vComponent::RenderWithoutWrap |
( |
|
$restricted_properties = null , |
|
|
|
$force_rendering = false |
|
) |
| |
|
protected |
Render vComponent without wrap lines
- Parameters
-
null | $restricted_properties | |
bool | $force_rendering | |
- Returns
- string
Definition at line 779 of file vComponent.php.
◆ RenderWithoutWrapFromIterator()
vComponent::RenderWithoutWrapFromIterator |
( |
|
$unrolledComponents | ) |
|
|
protected |
take source data in Iterator and recreate to string
- Parameters
-
boolean | $unroledComponents | - have any components |
- Returns
- string - rendered object
Definition at line 831 of file vComponent.php.
◆ RenderWithoutWrapFromObjects()
vComponent::RenderWithoutWrapFromObjects |
( |
| ) |
|
|
protected |
Let render property by property
- Returns
- string
Definition at line 812 of file vComponent.php.
◆ rewind()
◆ SetComponents()
vComponent::SetComponents |
( |
|
$new_component, |
|
|
|
$type = null |
|
) |
| |
Sets some or all sub-components of the component to the supplied new components
- Parameters
-
| array | of vComponent $new_components The new components to replace the existing ones |
string | $type | The type of components to be replaced. Defaults to null, which means all components will be replaced. |
Definition at line 645 of file vComponent.php.
◆ SetProperties()
vComponent::SetProperties |
( |
|
$new_properties, |
|
|
|
$type = null |
|
) |
| |
Set all properties, or the ones matching a particular type
Definition at line 535 of file vComponent.php.
◆ SetType()
vComponent::SetType |
( |
|
$type | ) |
|
Set the type of component which this is
Definition at line 343 of file vComponent.php.
◆ TestFilter()
vComponent::TestFilter |
( |
|
$filters | ) |
|
Test a PROP-FILTER or COMP-FILTER and return a true/false COMP-FILTER (is-defined | is-not-defined | (time-range?, prop-filter*, comp-filter*)) PROP-FILTER (is-defined | is-not-defined | ((time-range | text-match)?, param-filter*))
- Parameters
-
array | $filter | An array of XMLElement defining the filter |
- Returns
- boolean Whether or not this vComponent passes the test
Definition at line 928 of file vComponent.php.
◆ UnwrapComponent()
vComponent::UnwrapComponent |
( |
& |
$content | ) |
|
This unescapes the (CRLF + linear space) wrapping specified in RFC2445. According to RFC2445 we should always end with CRLF but the CalDAV spec says that normalising XML parsers often muck with it and may remove the CR. We accept either case.
Definition at line 768 of file vComponent.php.
◆ WrapComponent()
vComponent::WrapComponent |
( |
|
$content | ) |
|
This imposes the (CRLF + linear space) wrapping specified in RFC2445. According to RFC2445 we should always end with CRLF but the CalDAV spec says that normalising XML parsers often muck with it and may remove the CR. We output RFC2445 compliance.
In order to preserve pre-existing wrapping in the component, we split the incoming string on line breaks before running wordwrap over each component of that.
Definition at line 751 of file vComponent.php.
◆ $components
◆ $iterator
◆ $PREPARSED
vComponent::$PREPARSED = false |
|
static |
◆ $properties
◆ $propertyLocation
vComponent::$propertyLocation |
|
private |
◆ $seekBegin
◆ $seekEnd
◆ $type
◆ KEYBEGIN
const vComponent::KEYBEGIN = 'BEGIN:' |
◆ KEYBEGINLENGTH
const vComponent::KEYBEGINLENGTH = 6 |
◆ KEYEND
const vComponent::KEYEND = "END:" |
◆ KEYENDLENGTH
const vComponent::KEYENDLENGTH = 4 |
◆ VEOL
const vComponent::VEOL = "\r\n" |
The documentation for this class was generated from the following file: