Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

RouterRewrite Class Reference

Inheritance diagram for RouterRewrite:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 setRequest (HttpRequest $request)
 getRequest ()
 resetRequest ()
 setBaseUrl (HttpUrl $url)
 getBaseUrl ()
 resetBaseUrl ()
 addRoute ($name, RouterRule $route)
 addRoutes (array $routes)
 removeRoute ($name)
 hasRoute ($name)
 getRoute ($name)
 getCurrentRoute ()
 getCurrentRouteName ()
 getRoutes ()
 resetRoutes ()
 route (HttpRequest $request)
 Find a matching route to the current REQUEST_URI and inject returning values to the HttpRequest object.
 assembly (array $userParams=array(), $name=null, $reset=false, $encode=true)
 resetAll ()

Static Public Member Functions

static me ()

Protected Member Functions

 __construct ()
 setRequestParams (HttpRequest $request, array $params)

Protected Attributes

 $routes = array()
 $currentRoute = null
 $request = null
 $baseUrl = null

Detailed Description

Definition at line 12 of file RouterRewrite.class.php.


Constructor & Destructor Documentation

RouterRewrite::__construct (  )  [protected]

Definition at line 27 of file RouterRewrite.class.php.


Member Function Documentation

RouterRewrite::addRoute ( name,
RouterRule route 
)
Returns:
RouterRewrite

Definition at line 99 of file RouterRewrite.class.php.

References hasRoute().

Referenced by addRoutes().

Here is the call graph for this function:

RouterRewrite::addRoutes ( array $  routes  ) 
Returns:
RouterRewrite

Definition at line 114 of file RouterRewrite.class.php.

References addRoute().

Here is the call graph for this function:

RouterRewrite::assembly ( array $  userParams = array(),
name = null,
reset = false,
encode = true 
)
Exceptions:
RouterException 
Returns:
string

Definition at line 233 of file RouterRewrite.class.php.

References getBaseUrl(), getCurrentRouteName(), and getRoute().

Here is the call graph for this function:

RouterRewrite::getBaseUrl (  ) 
Returns:
HttpUrl

Definition at line 81 of file RouterRewrite.class.php.

Referenced by assembly().

RouterRewrite::getCurrentRoute (  ) 
Exceptions:
RouterException 
Returns:
RouterRule

Definition at line 164 of file RouterRewrite.class.php.

References getRoute().

Here is the call graph for this function:

RouterRewrite::getCurrentRouteName (  ) 
Exceptions:
RouterException 
Returns:
RouterRule

Definition at line 178 of file RouterRewrite.class.php.

Referenced by assembly().

RouterRewrite::getRequest (  ) 
Returns:
HttpRequest

Definition at line 53 of file RouterRewrite.class.php.

RouterRewrite::getRoute ( name  ) 
Exceptions:
RouterException 
Returns:
RouterRule

Definition at line 150 of file RouterRewrite.class.php.

References hasRoute().

Referenced by assembly(), and getCurrentRoute().

Here is the call graph for this function:

RouterRewrite::getRoutes (  ) 
Returns:
array

Definition at line 191 of file RouterRewrite.class.php.

RouterRewrite::hasRoute ( name  ) 
Returns:
boolean

Definition at line 141 of file RouterRewrite.class.php.

Referenced by addRoute(), getRoute(), and removeRoute().

static RouterRewrite::me (  )  [static]
Returns:
RouterRewrite

Implements Instantiatable.

Definition at line 35 of file RouterRewrite.class.php.

References Singleton::getInstance().

Referenced by RouterBaseRule::getPath(), RouterHostnameRule::resolvePath(), RouterHostnameRule::resolveSchema(), and RouterUrlHelper::url().

Here is the call graph for this function:

RouterRewrite::removeRoute ( name  ) 
Exceptions:
RouterException 
Returns:
RouterRewrite

Definition at line 126 of file RouterRewrite.class.php.

References hasRoute().

Here is the call graph for this function:

RouterRewrite::resetAll (  ) 
Returns:
RouterRewrite

Definition at line 259 of file RouterRewrite.class.php.

References resetBaseUrl(), resetRequest(), and resetRoutes().

Here is the call graph for this function:

RouterRewrite::resetBaseUrl (  ) 
Returns:
RouterRewrite

Definition at line 89 of file RouterRewrite.class.php.

Referenced by resetAll().

RouterRewrite::resetRequest (  ) 
Returns:
RouterRewrite

Definition at line 61 of file RouterRewrite.class.php.

Referenced by resetAll().

RouterRewrite::resetRoutes (  ) 
Returns:
RouterRule

Definition at line 199 of file RouterRewrite.class.php.

Referenced by resetAll().

RouterRewrite::route ( HttpRequest request  ) 

Find a matching route to the current REQUEST_URI and inject returning values to the HttpRequest object.

Returns:
HttpRequest

Definition at line 213 of file RouterRewrite.class.php.

References setRequest(), and setRequestParams().

Here is the call graph for this function:

RouterRewrite::setBaseUrl ( HttpUrl url  ) 
Returns:
RouterRewrite

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

RouterRewrite::setRequest ( HttpRequest request  ) 
Returns:
RouterRewrite

Definition at line 43 of file RouterRewrite.class.php.

Referenced by route().

RouterRewrite::setRequestParams ( HttpRequest request,
array $  params 
) [protected]
Returns:
RouterRewrite

Definition at line 272 of file RouterRewrite.class.php.

References HttpRequest::setAttachedVar().

Referenced by route().

Here is the call graph for this function:


Member Data Documentation

RouterRewrite::$baseUrl = null [protected]

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

RouterRewrite::$currentRoute = null [protected]

Definition at line 15 of file RouterRewrite.class.php.

RouterRewrite::$request = null [protected]

Definition at line 20 of file RouterRewrite.class.php.

RouterRewrite::$routes = array() [protected]

Definition at line 14 of file RouterRewrite.class.php.


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