Andrew's Web Libraries (AWL)
 All Classes Namespaces Functions Variables Pages
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)
 
 fill ($sp, $en, $pe)
 
 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

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

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.

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.

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.

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.

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.

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.

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.

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.

vProperty::TestFilter (   $filters)

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-defined | is-not-defined | ((time-range | text-match)?, param-filter*))

Parameters
array$filterAn array of XMLElement defining the filter
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 442 of file vProperty.php.

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 536 of file vProperty.php.

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.

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.


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