spunQ_DefaultUrlManagerArrayTypeHandler Class Reference

Manager for array types. More...

Inheritance diagram for spunQ_DefaultUrlManagerArrayTypeHandler:

spunQ_IDefaultUrlManagerTypeHandler

List of all members.

Public Member Functions

 generateRegex (spunQ_Type $type, spunQ_Map $options, spunQ_Locale $locale, &$greedy, spunQ_DefaultUrlManagerUrlTemplatePart $urlPart=NULL)
 Generates a regular expression that will match part of a url.
 generateUrlPart (spunQ_Type $type, spunQ_Map $options, spunQ_Locale $locale, $value, spunQ_DefaultUrlManagerUrlTemplatePart $urlPart=NULL)
 Creates part of a url using a variable.
 regexMatchToVariable (spunQ_Type $type, spunQ_Map $options, spunQ_Locale $locale, $match, &$parsedValue, spunQ_DefaultUrlManagerUrlTemplatePart $urlPart=NULL)
 Reverse operation to generateUrlPart().

Static Public Member Functions

static getInstance ()
 Returns the singleton instance.

Public Attributes

const VALUE_SEPARATOR = ','
 Character used for separating values.

Private Member Functions

 __construct ()
 Constructor.

Static Private Attributes

static $instance = NULL
 Singleton instance.


Detailed Description

Manager for array types.

Definition at line 6 of file DefaultUrlManagerArrayTypeHandler.class.php.


Member Function Documentation

spunQ_DefaultUrlManagerArrayTypeHandler::generateRegex ( spunQ_Type type,
spunQ_Map options,
spunQ_Locale locale,
&$  greedy,
spunQ_DefaultUrlManagerUrlTemplatePart urlPart = NULL 
)

Generates a regular expression that will match part of a url.

The regex will adhere to the specifications of spunQ_IUrlTemplate::toRegex().

Parameters:
$type The concreate type to process.
$options Options to the type. Will most commonly be an empty map. The UserType handler might pass member options to other handlers, though.
$locale Locale to create regex for.
$greedy Boolean value: whether the generated regular expression should be greedy. If a greedy value regex is generated, the parameter should be set to false.
$urlPart An optional url part to create the regex for. Some type handlers (such as the UserType handler) might take the variable definition into account (think of member references, for example).
Returns:
string

Implements spunQ_IDefaultUrlManagerTypeHandler.

Definition at line 42 of file DefaultUrlManagerArrayTypeHandler.class.php.

spunQ_DefaultUrlManagerArrayTypeHandler::generateUrlPart ( spunQ_Type type,
spunQ_Map options,
spunQ_Locale locale,
value,
spunQ_DefaultUrlManagerUrlTemplatePart urlPart = NULL 
)

Creates part of a url using a variable.

Parameters:
$type The concreate type to process.
$options Options to the type. Will most commonly be an empty map. The UserType handler might pass member options to other handlers, though.
$locale Locale to create string for.
$value The value to process. Evidently, the value should be of the type this handler is for.
$urlPart An optional url part to process for. Some type handlers (such as the UserType handler) might take the variable definition into account (think of member references, for example).

Implements spunQ_IDefaultUrlManagerTypeHandler.

Definition at line 58 of file DefaultUrlManagerArrayTypeHandler.class.php.

static spunQ_DefaultUrlManagerArrayTypeHandler::getInstance (  )  [static]

Returns the singleton instance.

Returns:
spunQ_DefaultUrlManagerArrayTypeHandler

Definition at line 25 of file DefaultUrlManagerArrayTypeHandler.class.php.

spunQ_DefaultUrlManagerArrayTypeHandler::regexMatchToVariable ( spunQ_Type type,
spunQ_Map options,
spunQ_Locale locale,
match,
&$  parsedValue,
spunQ_DefaultUrlManagerUrlTemplatePart urlPart = NULL 
)

Reverse operation to generateUrlPart().

Creates a variable out of a string passed through the url.

Parameters:
$type The concreate type to process.
$options Options to the type. Will most commonly be an empty map. The UserType handler might pass member options to other handlers, though.
$locale Locale the request is in.
$match String that matched the regular expression returned by generateRegex().
$parsedValue Out-parameter indicating whether the value could be parsed successfully.
$urlPart An optional url part to process for. Some type handlers (such as the UserType handler) might take the variable definition into account (think of member references, for example).
Returns:
any

Implements spunQ_IDefaultUrlManagerTypeHandler.

Definition at line 71 of file DefaultUrlManagerArrayTypeHandler.class.php.


Member Data Documentation

spunQ_DefaultUrlManagerArrayTypeHandler::$instance = NULL [static, private]

Singleton instance.

Type:
spunQ_DefaultUrlManagerArrayTypeHandler

Definition at line 19 of file DefaultUrlManagerArrayTypeHandler.class.php.

Character used for separating values.

Must not be a slash, as slash is defined as the spunQ_IUrlTemplatePart separator!

Definition at line 13 of file DefaultUrlManagerArrayTypeHandler.class.php.


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

Generated on Fri Jul 1 11:12:39 2011 for spunQ3 by  doxygen 1.5.9