Andrew's Web Libraries (AWL)
|
Public Member Functions | |
__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) | |
isValid () | |
setMaster ($master) | |
getMaster () | |
Public Attributes | |
const | KEYBEGIN = 'BEGIN:' |
const | KEYBEGINLENGTH = 6 |
const | KEYEND = "END:" |
const | KEYENDLENGTH = 4 |
const | VEOL = "\r\n" |
Static Public Attributes | |
static | $PREPARSED = false |
Protected Member Functions | |
RenderWithoutWrap ($restricted_properties=null, $force_rendering=false) | |
RenderWithoutWrapFromObjects () | |
RenderWithoutWrapFromIterator ($unrolledComponents) | |
![]() | |
invalidate () | |
Private Attributes | |
$components | |
$properties | |
$type | |
$iterator | |
$seekBegin | |
$seekEnd | |
$propertyLocation | |
Additional Inherited Members | |
![]() | |
$lineHeap | |
$valid = true | |
$master | |
Definition at line 21 of file vComponent.php.
vComponent::AddComponent | ( | $new_component | ) |
Adds a new subcomponent
vComponent | $new_component | The new component to append to the set |
Definition at line 647 of file vComponent.php.
vComponent::AddProperty | ( | $new_property, | |
$value = null , |
|||
$parameters = null |
|||
) |
Adds a new property
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 531 of file vComponent.php.
vComponent::ClearComponents | ( | $type = null | ) |
Clear all components, or the components matching a particular type
string | $type | The type of component - omit for all components |
Definition at line 590 of file vComponent.php.
vComponent::ClearProperties | ( | $type = null | ) |
Clear all properties, or the properties matching a particular type
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 490 of file vComponent.php.
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.
vComponent::ComponentCount | ( | ) |
vComponent::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
Definition at line 163 of file vComponent.php.
vComponent::getComponentAt | ( | $position | ) |
$position |
Definition at line 296 of file vComponent.php.
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 )
mixed | $type | The type(s) to match (default: All) |
boolean | $normal_match | Set to false to invert the match (default: true) |
Definition at line 562 of file vComponent.php.
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.
vComponent::GetPropertiesByPath | ( | $path | ) |
Return an array of properties matching the specified path
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 438 of file vComponent.php.
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.
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.
vComponent::GetType | ( | ) |
Return the type of component which this is
Definition at line 335 of file vComponent.php.
vComponent::MaskComponents | ( | $keep, | |
$recursive = true |
|||
) |
Mask components, removing any that are not of the types in the list
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 680 of file vComponent.php.
vComponent::MaskProperties | ( | $keep, | |
$component_list = null |
|||
) |
Mask properties, removing any that are not in the list
array | $keep | An array of property names to be kept |
array | $component_list | An array of component types to check within |
Definition at line 704 of file vComponent.php.
vComponent::propertiesCount | ( | ) |
vComponent::Render | ( | $restricted_properties = null , |
|
$force_rendering = false |
|||
) |
render object to string with wraped lines
null | $restricted_properties | |
bool | $force_rendering |
Definition at line 880 of file vComponent.php.
|
protected |
Render vComponent without wrap lines
null | $restricted_properties | |
bool | $force_rendering |
Definition at line 760 of file vComponent.php.
|
protected |
take source data in Iterator and recreate to string
boolean | $unroledComponents | - have any components |
Definition at line 812 of file vComponent.php.
|
protected |
vComponent::SetComponents | ( | $new_component, | |
$type = null |
|||
) |
Sets some or all sub-components of the component to the supplied new components
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 626 of file vComponent.php.
vComponent::SetProperties | ( | $new_properties, | |
$type = null |
|||
) |
Set all properties, or the ones matching a particular type
Definition at line 516 of file vComponent.php.
vComponent::SetType | ( | $type | ) |
Set the type of component which this is
Definition at line 343 of file vComponent.php.
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*))
array | $filter | An array of XMLElement defining the filter |
Definition at line 909 of file vComponent.php.
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 749 of file vComponent.php.
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 732 of file vComponent.php.