Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
PKPPageRouter Class Reference
Inheritance diagram for PKPPageRouter:
PKPRouter PageRouter

Public Member Functions

 getCacheablePages ()
 
 getCacheFilename ($request)
 
 getInstallationPages ()
 
 getRequestedArgs ($request)
 
 getRequestedOp ($request)
 
 getRequestedPage ($request)
 
 handleAuthorizationFailure ($request, $authorizationMessage)
 
 isCacheable ($request, $testOnly=false)
 
 PKPPageRouter ()
 
 redirectHome ($request)
 
 route ($request)
 
 url ($request, $newContext=null, $page=null, $op=null, $path=null, $params=null, $anchor=null, $escape=false)
 
- Public Member Functions inherited from PKPRouter
 _authorizeInitializeAndCallRequest (&$serviceEndpoint, $request, &$args, $validate=true)
 
 _contextLevelToContextName ($contextLevel)
 
 _contextNameToContextLevel ($contextName)
 
 _urlCanonicalizeNewContext ($newContext)
 
 _urlFromParts ($baseUrl, $pathInfoArray=array(), $queryParametersArray=array(), $anchor= '', $escape=false)
 
 _urlGetAdditionalParameters ($request, $params=null, $escape=true)
 
 _urlGetBaseAndContext ($request, $newContext=array())
 
getApplication ()
 
 getCacheFilename ($request)
 
getContext ($request, $requestedContextLevel=1)
 
getContextByName ($request, $requestedContextName)
 
getDispatcher ()
 
 getIndexUrl ($request)
 
 getRequestedContextPath ($request, $requestedContextLevel=1)
 
 getRequestedContextPaths ($request)
 
 handleAuthorizationFailure ($request, $authorizationMessage)
 
 isCacheable ($request)
 
 PKPRouter ()
 
 route ($request)
 
 setApplication (&$application)
 
 setDispatcher ($dispatcher)
 
 supports ($request)
 
 url ($request, $newContext=null, $handler=null, $op=null, $path=null, $params=null, $anchor=null, $escape=false)
 

Public Attributes

 $_cacheFilename
 
 $_indexUrl
 
 $_installationPages = array('install', 'help', 'header', 'sidebar')
 
 $_op
 
 $_page
 
- Public Attributes inherited from PKPRouter
 $_contextDepth
 
 $_contextList
 
 $_contextPaths = array()
 
 $_contexts = array()
 
 $_flippedContextList
 

Detailed Description

Class mapping an HTTP request to a handler or context.

Definition at line 21 of file PKPPageRouter.inc.php.

Member Function Documentation

PKPPageRouter::getCacheablePages ( )

get the cacheable pages

Returns
array

Definition at line 73 of file PKPPageRouter.inc.php.

PKPPageRouter::getCacheFilename (   $request)

Determine the filename to use for a local cache file.

Parameters
$requestPKPRequest
Returns
string

Definition at line 145 of file PKPPageRouter.inc.php.

PKPPageRouter::getInstallationPages ( )

get the installation pages

Returns
array

Definition at line 65 of file PKPPageRouter.inc.php.

PKPPageRouter::getRequestedArgs (   $request)

Get the arguments requested in the URL.

Parameters
$requestPKPRequest the request to be routed
Returns
array

Definition at line 134 of file PKPPageRouter.inc.php.

PKPPageRouter::getRequestedOp (   $request)

Get the operation requested in the URL (assumed to exist in the requested page handler).

Parameters
$requestPKPRequest the request to be routed
Returns
string

Definition at line 122 of file PKPPageRouter.inc.php.

PKPPageRouter::getRequestedPage (   $request)

Get the page requested in the URL.

Parameters
$requestPKPRequest the request to be routed
Returns
String the page path (under the "pages" directory)

Definition at line 110 of file PKPPageRouter.inc.php.

PKPPageRouter::handleAuthorizationFailure (   $request,
  $authorizationMessage 
)

Handle an authorization failure.

Parameters
$requestRequest
$authorizationMessagestring a translation key with the authorization failure message.

Definition at line 396 of file PKPPageRouter.inc.php.

PKPPageRouter::isCacheable (   $request,
  $testOnly = false 
)

Determine whether or not the request is cacheable.

Parameters
$requestPKPRequest
$testOnlyboolean required for unit test to bypass session check.
Returns
boolean

Definition at line 85 of file PKPPageRouter.inc.php.

PKPPageRouter::PKPPageRouter ( )

Constructor

Definition at line 57 of file PKPPageRouter.inc.php.

PKPPageRouter::redirectHome (   $request)

Redirect to user home page (or the user group home page if the user has one user group).

Parameters
$requestPKPRequest the request to be routed

Definition at line 406 of file PKPPageRouter.inc.php.

References Application\getContextDAO().

PKPPageRouter::route (   $request)

Routes a given request to a handler operation

Parameters
$requestPKPRequest

Definition at line 167 of file PKPPageRouter.inc.php.

PKPPageRouter::url (   $request,
  $newContext = null,
  $page = null,
  $op = null,
  $path = null,
  $params = null,
  $anchor = null,
  $escape = false 
)

Build a handler request URL into PKPApplication.

Parameters
$requestPKPRequest the request to be routed
$newContextmixed Optional contextual paths
$handlerstring Optional name of the handler to invoke
$opstring Optional name of operation to invoke
$pathmixed Optional string or array of args to pass to handler
$paramsarray Optional set of name => value pairs to pass as user parameters
$anchorstring Optional name of anchor to add to URL
$escapeboolean Whether or not to escape ampersands, square brackets, etc. for this URL; default false.
Returns
string the URL

Definition at line 249 of file PKPPageRouter.inc.php.

Member Data Documentation

string PKPPageRouter::$_cacheFilename

cache filename

Definition at line 52 of file PKPPageRouter.inc.php.

string PKPPageRouter::$_indexUrl

index url

Definition at line 47 of file PKPPageRouter.inc.php.

array PKPPageRouter::$_installationPages = array('install', 'help', 'header', 'sidebar')

pages that don't need an installed system to be displayed

Definition at line 26 of file PKPPageRouter.inc.php.

string PKPPageRouter::$_op

the requested operation

Definition at line 42 of file PKPPageRouter.inc.php.

string PKPPageRouter::$_page

the requested page

Definition at line 37 of file PKPPageRouter.inc.php.


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