| alpha--controller--front

# Class: FrontController Source Location: /controller/front/FrontController.inc ## Class FrontController Class Overview
The front controller designed to optionally handle all requests Located in /controller/front/FrontController.inc [line 58]
Author(s): John Collins <dev@alphaframework.org> Information Tags:
Version: | $Id: FrontController.inc 1453 2011-12-04 15:12:54Z johnc $
Copyright: | Copyright (c) 2011, John Collins (founder of Alpha Framework). All rights reserved.
     Redistribution and use in source and binary forms, with or
     without modification, are permitted provided that the
     following conditions are met:

     * Redistributions of source code must retain the above
       copyright notice, this list of conditions and the
       following disclaimer.
     * Redistributions in binary form must reproduce the above
       copyright notice, this list of conditions and the
       following disclaimer in the documentation and/or other
       materials provided with the distribution.
     * Neither the name of the Alpha Framework nor the names
       of its contributors may be used to endorse or promote
       products derived from this software without specific
       prior written permission.

     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
     CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
     INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
     CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
     OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Since: | 1.0
License: | The BSD License
| Methods __construct checkAlias decodeQueryParams encodeQuery generateSecureURL getAliasController getAliasParam getControllerAlias getControllerParam getDecodeQueryParams getFilters getPageController hasAlias loadController registerAlias registerFilter setEncrypt
[ Top ] Method Summary
static string | decodeQueryParams() | Static method to return the decoded GET paramters from an encrytpted tk value
static string | encodeQuery() | Static method for encoding a query string
static string | generateSecureURL() | Static method for generating an absolute, secure URL for a page controller
static array | getDecodeQueryParams() | Static method to return the decoded GET paramters from an encrytpted tk value as an array of key/value pairs.
FrontController | __construct() | The constructor method
boolean | checkAlias() | Check to see if an alias exists for the given alias name
string | getAliasController() | Gets the full name of the controller for the given alias
string | getAliasParam() | Gets the parameter name expected in requests to the controller with the given alias
string | getControllerAlias() | Gets the name of the alias for the given controller
string | getControllerParam() | Gets the parameter name expected in requests to the controller with the given controller name
array | getFilters() | Returns the array of filters currently attached to this FrontController
string | getPageController() | Getter for the page controller
boolean | hasAlias() | Check to see if an alias exists for the given controller name
void | loadController() | Method to load the page controller
void | registerAlias() | Used to register a controller alias to enable shorter URLs with mod_rewrite support enabled. Note that only controllers with a single parameter are supported.
void | registerFilter() | Add the supplied filter object to the list of filters ran on each request to the front controller
void | setEncrypt() | Sets the encryption flag
[ Top ] Methods static method decodeQueryParams [line 260]
`static string decodeQueryParams( $tk )`
Static method to return the decoded GET paramters from an encrytpted tk value Parameters:
| $tk: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] static method encodeQuery [line 216]
`static string encodeQuery( string $queryString )`
Static method for encoding a query string Parameters:
string | $queryString: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] static method generateSecureURL [line 200]
`static string generateSecureURL( string $params )`
Static method for generating an absolute, secure URL for a page controller Parameters:
string | $params: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] static method getDecodeQueryParams [line 279]
`static array getDecodeQueryParams( $tk )`
Static method to return the decoded GET paramters from an encrytpted tk value as an array of key/value pairs. Parameters:
| $tk: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] Constructor __construct [line 122]
`FrontController __construct( )`
The constructor method API Tags:
Access: | public
Information Tags:
Throws: | ResourceNotFoundException
Since: | 1.0
[ Top ] checkAlias [line 427]
`boolean checkAlias( string $alias )`
Check to see if an alias exists for the given alias name Parameters:
string | $alias: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getAliasController [line 455]
`string getAliasController( string $alias )`
Gets the full name of the controller for the given alias Parameters:
string | $alias: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getAliasParam [line 482]
`string getAliasParam( string $alias )`
Gets the parameter name expected in requests to the controller with the given alias Parameters:
string | $alias: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getControllerAlias [line 467]
`string getControllerAlias( string $controller )`
Gets the name of the alias for the given controller Parameters:
string | $controller: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getControllerParam [line 496]
`string getControllerParam( string $controller )`
Gets the parameter name expected in requests to the controller with the given controller name Parameters:
string | $controller: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getFilters [line 604]
`array getFilters( )`
Returns the array of filters currently attached to this FrontController API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getPageController [line 580]
`string getPageController( )`
Getter for the page controller API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] hasAlias [line 441]
`boolean hasAlias( string $controller )`
Check to see if an alias exists for the given controller name Parameters:
string | $controller: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] loadController [line 308]
`void loadController( [boolean $allowRedirects = true] )`
Method to load the page controller Parameters:
boolean | $allowRedirects: | Defaults to true, set to false if you want to prevent the front controller from redirecting the request
API Tags:
Access: | public
Information Tags:
Throws: | ResourceNotFoundException
Since: | 1.0
[ Top ] registerAlias [line 411]
`void registerAlias( string $controller, string $alias, [string $param = null] )`
Used to register a controller alias to enable shorter URLs with mod_rewrite support enabled. Note that only controllers with a single parameter are supported. Parameters:
string | $controller: | The name of the page controller class
string | $alias: | The URL alias for the page controller
string | $param: | The name of the GET parameter on the alias URL request
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] registerFilter [line 591]
`void registerFilter( AlphaFilterInterface $filterObject )`
Add the supplied filter object to the list of filters ran on each request to the front controller Parameters:
AlphaFilterInterface | $filterObject: |
API Tags:
Access: | public
Information Tags:
Throws: | IllegalArguementException
Since: | 1.0
[ Top ] setEncrypt [line 170]
`void setEncrypt( boolean $encryptedQuery )`
Sets the encryption flag Parameters:
boolean | $encryptedQuery: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] Documentation generated on Tue, 13 Dec 2011 20:26:56 +0000 by phpDocumentor 1.4.3