Class PhpiCalLib_Parameter

Description

Base class for all contentline parameters

Located in /parameters.php (line 99)


	
			
Direct descendents
Class Description
PhpiCalLib_ParameterFactory The factory class for creating the right kind of PhpiCalLib_Parameter objects.
PhpiCalLib_Parameters_Value The VALUE parameter.
Variable Summary
static mixed $BadParamSplitRegex
static string $IanaTokenRegex
static string $QSafeCharRegex
static string $SafeCharRegex
static string $UnSafeCharRegex
array: $aValues
string $Name
integer $Type
Method Summary
static string GetParamRegex ()
static int ToParameterType (string $Name)
PhpiCalLib_Parameter __construct ()
void AddValue (string $ParamValue)
A Create ( $Param, string $String)
string GetName ()
PHPICALLIB_PARAMETER_* GetType ()
string GetValue ()
array GetValues ()
void SetName (string $Name)
void SetType (integer $Type)
void SetValue (string $Value)
void SetValues (array $aValues)
A ToString ()
Variables
static mixed $BadParamSplitRegex = '[^\x09\x20-\x39\x3c-\x7e]' (line 219)
  • access: public
static string $IanaTokenRegex = '[a-zA-Z0-9-]+' (line 151)

Regex to capture validate an iana-token

static string $QSafeCharRegex = '[\x09\x20\x21\x23-\x7E]' (line 188)

A regular expression to match the QSAFE-CHAR token.

      QSAFE-CHAR    = WSP / %x21 / %x23-7E / NON-US-ASCII
 ==>
 ### Note we are going to assume that the utf-8 decoding has been done for us already and that
 our string is essentially in unicode
      QSAFE-CHAR    = %x09 / %x20-21 / %x23-7E

static string $SafeCharRegex = '[\x09\x20\x21\x23-\x2B\x2D-\x39\x3C-\x7E]' (line 167)

A regular express to match the SAFE-CHAR token.

      SAFE-CHAR     = WSP / %x21 / %x23-2B / %x2D-39 / %x3C-7E
                    / NON-US-ASCII
      ; Any character except CONTROL, DQUOTE, ";", ":", ","
 ==>
 ### Note we are going to assume that the utf-8 decoding has been done for us already and that
 our string is essentially in unicode
      SAFE-CHAR     = %x09 / %x20-21 / %x23-2B / %x2D-39 / %x3C-7E

static string $UnSafeCharRegex = '[^\x09\x20\x21\x23-\x2B\x2D-\x39\x3C-\x7E]' (line 174)

An array to locate the converse of SafeCharRegex.

array: $aValues = array() (line 113)

The "param-value" tokens

  • var: of strings
  • access: protected
string $Name = '' (line 104)

The "param-name" token

  • access: protected
integer $Type = 0 (line 108)
  • var: The type of this parameter
  • access: protected
Methods
static method GetParamRegex (line 200)

A quick regular expression to validate a param token.

 ==>
      param         = param-name "=" param-value *("," param-value)
      param-name    = iana-token / x-name

static string GetParamRegex ()
static method ToParameterType (line 234)

Convert a parameter name to it's defined type

  • return: one of the PHPICALLIB_PARAMETER_* properties
  • access: public
static int ToParameterType (string $Name)
  • string $Name: a "name" RFC2445 token
Constructor __construct (line 224)

Constructor

  • access: public
PhpiCalLib_Parameter __construct ()

Redefined in descendants as:
AddValue (line 430)

Add another parameter value

  • access: public
void AddValue (string $ParamValue)
  • string $ParamValue

Redefined in descendants as:
Create (line 271)

Parse a param from the string, returning the new object

  • return: PhpiCalLib_Parameter derived class, according to what CreateParameter returned
  • access: public
A Create ( $Param, string $String)
  • string $String: The encoded value that represents the parameter
  • $Param
CreateParameter (line 259)

Create a new Parameter object

A component would override this class, providing a new version of this function in order to choose the right kind of class to create which will offer better validation.

  • return: derived class
  • access: protected
PhpiCalLib_Parameter CreateParameter (string $Name)
  • string $Name: The name of the param

Redefined in descendants as:
GetName (line 351)

Access the name of the parameter

  • access: public
string GetName ()
GetType (line 393)

Access the component type

Note this will return PHPICALLIB_PARAMETER_IANAPARAM for components that it doesn't recognize

  • access: public
PHPICALLIB_PARAMETER_* GetType ()
GetValue (line 472)

Get the value of this single value property

If the property has more than one value, it returns the first. If it has no values, it returns an empty string

  • access: public
string GetValue ()
GetValues (line 421)

Get all the values of this parameter

  • return: Of the parameter values
  • access: public
array GetValues ()
SetName (line 363)

Set the name of the parameter

  • access: public
void SetName (string $Name)
  • string $Name
SetType (line 402)

Set the type of the component

  • access: public
void SetType (integer $Type)
  • integer $Type
SetValue (line 482)

Set the values to a single new value

  • access: public
void SetValue (string $Value)
  • string $Value
SetValues (line 457)

Set the new property values.

  • access: public
void SetValues (array $aValues)
  • array $aValues: The new parameter values, to replace the existing values.
ToString (line 491)

Dump the parameter to a string

  • return: string representation in the default code page
  • access: public
A ToString ()

Documentation generated on Tue, 01 Apr 2008 00:20:38 +0100 by phpDocumentor 1.4.0