Andrew's Web Libraries (AWL)
Loading...
Searching...
No Matches
vProperty Class Reference
Inheritance diagram for vProperty:
Collaboration diagram for vProperty:

Public Member Functions

 __construct ( $name=null, &$master=null, &$refData=null, $seek=null)
 
 ParseFromIterator ()
 
 ParseFrom (&$unescaped)
 
 Name ( $newname=null)
 
 Value ( $newvalue=null)
 
 Parameters ( $newparams=null)
 
 TextMatch ( $search)
 
 GetParameterValue ( $name)
 
 SetParameterValue ( $name, $value)
 
 ClearParameters ( $type=null)
 
 RenderParameters ()
 
 Render ( $force=false)
 
 __toString ()
 
 TestFilter ( $filters, $matchAll=true)
 
 fill ($sp, $en, $pe)
 
 TestTextMatch ( $filter, $haystack)
 
 TestParamFilter ( $filters, $parameter_value)
 
- Public Member Functions inherited from vObject
 __construct (&$master=null)
 
 isValid ()
 
 setMaster ($master)
 
 getMaster ()
 

Protected Attributes

 $name
 
 $parameters
 
 $content
 
 $iterator
 
 $seek
 
 $line
 
- Protected Attributes inherited from vObject
 $lineHeap
 
 $valid = true
 
 $master
 

Static Private Member Functions

static escapeParameter ($p)
 

Additional Inherited Members

- Protected Member Functions inherited from vObject
 invalidate ()
 

Detailed Description

Definition at line 9 of file vProperty.php.

Constructor & Destructor Documentation

◆ __construct()

vProperty::__construct ( $name = null,
& $master = null,
& $refData = null,
$seek = null )

#- Parsing of the incoming string is now performed lazily, in ParseFromIterator. You should use getter methods such as Value() and getParameterValue() instead of direct access to $content, $parameters etc, to ensure that parsing has occurred.

Definition at line 61 of file vProperty.php.

Member Function Documentation

◆ __toString()

vProperty::__toString ( )

Definition at line 428 of file vProperty.php.

◆ ClearParameters()

vProperty::ClearParameters ( $type = null)

Clear all parameters, or the parameters matching a particular type

Parameters
string | array$typeThe type of parameters or an array associating parameter names with true values: array( 'PARAMETER' => true, 'PARAMETER2' => true )

Definition at line 315 of file vProperty.php.

◆ escapeParameter()

static vProperty::escapeParameter ( $p)
staticprivate

Definition at line 335 of file vProperty.php.

◆ fill()

vProperty::fill ( $sp,
$en,
$pe )

Definition at line 507 of file vProperty.php.

◆ GetParameterValue()

vProperty::GetParameterValue ( $name)

Get the value of a parameter

Parameters
string$nameThe name of the parameter to retrieve the value for
Returns
string The value of the parameter

Definition at line 276 of file vProperty.php.

◆ Name()

vProperty::Name ( $newname = null)

Get/Set name property

Parameters
string$newname[optional] A new name for the property
Returns
string The name for the property.

Definition at line 205 of file vProperty.php.

◆ Parameters()

vProperty::Parameters ( $newparams = null)

Get/Set parameters in their entirety

Parameters
array$newparamsAn array of new parameter key/value pairs. The 'value' may be an array of values.
Returns
array The current array of parameters for the property.

Definition at line 242 of file vProperty.php.

◆ ParseFrom()

vProperty::ParseFrom ( & $unescaped)

Definition at line 119 of file vProperty.php.

◆ ParseFromIterator()

vProperty::ParseFromIterator ( )

Parses the incoming string, which is formatted as per RFC2445 as a propname[;param1=pval1[; ... ]]:propvalue However we allow ourselves to assume that the RFC2445 content unescaping has already happened when myComponent::ParseFrom() called myComponent::UnwrapComponent().

Note this function is called lazily, from the individual getter methods. This avoids the cost of parsing at the point of object instantiation.

Definition at line 102 of file vProperty.php.

◆ Render()

vProperty::Render ( $force = false)

Render a suitably escaped RFC2445 content string.

Content escaping does not apply to these properties culled from RFC2445

Content escaping does not apply to these properties culled from RFC6350 / RFC2426

Content escaping applies by default to other properties

Definition at line 371 of file vProperty.php.

◆ RenderParameters()

vProperty::RenderParameters ( )

Render the set of parameters as key1=value1[;key2=value2[; ...]] with any colons or semicolons escaped.

Definition at line 344 of file vProperty.php.

◆ SetParameterValue()

vProperty::SetParameterValue ( $name,
$value )

Set the value of a parameter

Parameters
string$nameThe name of the parameter to set the value for
string$valueThe value of the parameter

Definition at line 296 of file vProperty.php.

◆ TestFilter()

vProperty::TestFilter ( $filters,
$matchAll = true )

Test a PROP-FILTER or PARAM-FILTER and return a true/false PROP-FILTER (is-defined | is-not-defined | ((time-range | text-match)?, param-filter*)) PARAM-FILTER (is-not-defined | text-match?)

Parameters
array$filterAn array of XMLElement defining the filter
bool$matchAllIf true, all given filters must match (AND), otherwise a single match suffices (OR)
Returns
boolean Whether or not this vProperty passes the test
Todo
: While this is unimplemented here at present, most time-range tests should occur at the SQL level.

Definition at line 443 of file vProperty.php.

◆ TestParamFilter()

vProperty::TestParamFilter ( $filters,
$parameter_value )
Todo
: While this is unimplemented here at present, most time-range tests should occur at the SQL level.

Definition at line 578 of file vProperty.php.

◆ TestTextMatch()

vProperty::TestTextMatch ( $filter,
$haystack )

Definition at line 511 of file vProperty.php.

◆ TextMatch()

vProperty::TextMatch ( $search)

Test if our value contains a string

Parameters
string$searchThe needle which we shall search the haystack for.
Returns
string The name for the property.

Definition at line 263 of file vProperty.php.

◆ Value()

vProperty::Value ( $newvalue = null)

Get/Set the content of the property

Parameters
string$newvalue[optional] A new value for the property
Returns
string The value of the property.

Definition at line 224 of file vProperty.php.

Member Data Documentation

◆ $content

vProperty::$content
protected

Definition at line 33 of file vProperty.php.

◆ $iterator

vProperty::$iterator
protected

Definition at line 40 of file vProperty.php.

◆ $line

vProperty::$line
protected

Definition at line 48 of file vProperty.php.

◆ $name

vProperty::$name
protected

Definition at line 19 of file vProperty.php.

◆ $parameters

vProperty::$parameters
protected

Definition at line 26 of file vProperty.php.

◆ $seek

vProperty::$seek
protected

Definition at line 46 of file vProperty.php.


The documentation for this class was generated from the following file: