spunQ_IUrlManager Interface Reference

Responsible for creating/parsing urls for spunQ_HttpEntryPoints. More...

Inheritance diagram for spunQ_IUrlManager:

spunQ_DefaultUrlManager spunQ_WormholeUrlManager

List of all members.

Public Member Functions

 getEntryPoint ()
 Provides the spunQ_HttpEntryPoint this object is managing.
 getUrlTemplates ()
 Gets all available url templates for the entry point.
 processDefaultValue ($variable, $typeName, $value)
 Provides the correct value for a default declaration.
 createHtmlLink (spunQ_Locale $locale, array $variables)
 Generates an http link pointing to this manager's entry point.


Detailed Description

Responsible for creating/parsing urls for spunQ_HttpEntryPoints.

Definition at line 6 of file IUrlManager.interface.php.


Member Function Documentation

spunQ_IUrlManager::createHtmlLink ( spunQ_Locale locale,
array $  variables 
)

Generates an http link pointing to this manager's entry point.

If the returned value is not an absolute link (an absolute link is one starting with http://, for example), the returned value will already be run through spunQ_UrlManager::addGlobalPrefix().

Parameters:
$locale Locale to create link for. The manager will decide which url template to use according to this value.
$variables Variables available for the link generation. Missing variables are expected to be pulled from the entry points default declarations.
Returns:
string

Implemented in spunQ_DefaultUrlManager, and spunQ_WormholeUrlManager.

spunQ_IUrlManager::getEntryPoint (  ) 

Provides the spunQ_HttpEntryPoint this object is managing.

Returns:
spunQ_HttpEntryPoint

Implemented in spunQ_DefaultUrlManager.

spunQ_IUrlManager::getUrlTemplates (  ) 

Gets all available url templates for the entry point.

Returns:
array<spunQ_IUrlTemplate>

Implemented in spunQ_DefaultUrlManager.

spunQ_IUrlManager::processDefaultValue ( variable,
typeName,
value 
)

Provides the correct value for a default declaration.

The default declaration @default user 14 will return the user with id 14 for the default implementation. Parameters to this function would then be:

  • $variable: user
  • $typeName: string spunQ.user.User.
  • $value: 14
Parameters:
$variable Name of the variable to process value for.
$typeName Type of the variable as string (as declared in the entry point).
$value The default declaration that was given in the entry point's doc comment.
Returns:
any Depends on the $typeName of the $variable.

Implemented in spunQ_DefaultUrlManager.


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

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