Inherits PntPage.
Inherited by Site.
Data Fields | |
$baseUrl | |
$debugMode = '' | |
$funkyUrls = false | |
$funkyAlias = 'index.php?' | |
$absoluteUrls = false | |
$xFrameOptions = 'DENY' | |
$httpRequestThrowsExp = true | |
$dir | |
$domainDir | |
$requestStartTime | |
$filters | |
$converter | |
$sessionStarted = false | |
$isSiteRunning =true | |
$name ="site" | |
$os ="linux" | |
$dbUser | |
$dbPwd | |
$dbAddress | |
$dbPort | |
$dbName | |
Data Fields inherited from PntPage | |
$infoStyle | |
$converters | |
$parts | |
$filterPartString | |
$footprintId | |
Data Fields inherited from PntRequestHandler | |
$whole | |
$information | |
$controller | |
$requestData | |
$request | |
Additional Inherited Members | |
Static Public Member Functions inherited from PntPage | |
static | getInfoStyleOk () |
static | getInfoStyleError () |
static | getInfoStyleWarning () |
__construct | ( | $dir = "beheer" | ) |
accessDenied | ( | $handler, | |
$errorMessage | |||
) |
Forward to Access Denied ErrorPage. Die afterwards
buildUrl | ( | $params, | |
$appName = null |
|||
) |
checkAccessHandler | ( | $handler, | |
$checkType = null , |
|||
$prop = null |
|||
) |
Check access to a RequestHandler with the SecrurityManager.
PntRequestHandler | $handler | The RequestHandler being accessed String $type the type of access, corrsponds to the SecurityManager function to be called |
$prop | PntPropertyDescriptor $prop Teh property being accessed (if any) |
createObjects | ( | ) |
inlcudes, instantiates and confiures some general purpose objects. Most class loading and instattiation is done Dynamically on a need-to-use basis by the RequestHandlers and the files and classes they include. Default implementation does include ValueValidator and StringConverter and instiantiates StringConverter and the context scout (see ::initScout)
forwardRequest | ( | $requestData, | |
$information = null |
|||
) |
Include and instantiate a PntRequestHandler and let it handle the request. For compatibility with older versions op phpPeanuts, the default database connection is initialized if that has not already been done.
array | $requestData | like $_REQUEST used to decide which PntRequestHandler to include and instantiate, and passed to the PntRequestHandler as the requst data. |
string | $information | to be passed to the PntRequestHandler, usually overrides the pntInfo parameter if not null (this behavior depends on the actual PntRequestHandler) |
forwardToHandler | ( | $requestHandler | ) |
Let the requestHandler handle the HTTP request. the request handler must already be properly initialized,
PntRequestHandler | $requestHandler |
forwardToLoginPage | ( | $requestData, | |
$errorMessage = null |
|||
) |
Forward to the login page.
array | $request | request data to pass to the login page |
string | $errorMessage | HTML, only to be passed if login failed. |
getAppName | ( | $domainDir = '' , |
|
$type = '' , |
|||
$pntHandler = '' |
|||
) |
string | $domainDir | where the type class is |
string | $type | pntType |
string | $pntHandler | of the user interface |
getBaseUrl | ( | ) |
The baseUrl is the the url to the folder that holds all applications folders and the classes folder etc. Normally this is the parent folder of the folder where the current script is running. This method initializes the baseUrl field if it has not been set using
getContextHref | ( | $footprintId | ) |
Context Scouting
int | $footprintId | the id of the footprint to get the context href from |
getConverter | ( | ) |
getDebugMode | ( | ) |
getDir | ( | ) |
getDomainDir | ( | $type = null | ) |
folder whithin the classes folder where domain classes are included from. If not set to Site from the index.php script, this defaults to getDir without trailing slash
getErrorHandler | ( | ) |
getGlobalFilterFor | ( | $type, | |
$persistent = false |
|||
) |
Returns a clone of the first global filter that applies to the type, with the itemType set
string | $type | the type name |
getGlobalFilters | ( | ) |
getGlobalOptionsFilter | ( | $type, | |
$propName | |||
) |
Returns the filter to apply to the options of the type
string | $type | the type name $param $propName the name of the property whose options to filter NB, the property is not situated on $type but having $type as its type! |
getImagesDir | ( | ) |
getIncludesDir | ( | ) |
getInvalidActionTicketMessage | ( | ) |
getMaxTicketDiff | ( | ) |
Returns the maximum diffence between the pntActionTicket from the request and from the session.
getScout | ( | ) |
Context Scouting
getSecurityManager | ( | ) |
getTryUseClassTryParams | ( | $className, | |
$dir | |||
) |
getUiDir | ( | $type, | |
$domainDir, | |||
$pntHandler | |||
) |
Derives a user interface folder (application folder) from domain folder.
string | $type | pntType |
string | $domainDir | where the type class is |
string | $pntHandler | of the user interface |
guessContextTypeFolder | ( | $type | ) |
Guess the domain folder for the type
string | $type | like a class name |
handleRequest | ( | ) |
Handle a HTTP request. Called from index.php in the application folder after instantiation and setting dir and eventually domainDir.
importLibraries | ( | ) |
Includes some general libraries and classes. Most class loading is done Dynamically on a need-to-include basis by the RequestHandlers and the files and classes they include. Default implementation is to include DatabaseConnection, QueryHandler May be overridden on Site
initConverter | ( | ) |
Instantiates and initializes the StringConverter and if its dateTimezone is set, sets its through date_default_timezone_set.
initDatabaseConnection | ( | ) |
Only used if no database connection has been made before ::forwardRequest. does not support PntPdoDao
initHttpRequest | ( | ) |
initScout | ( | ) |
Context Scouting Initializes the context scout
isFunkyUrls | ( | ) |
returns funkyUrls setting funkyUrls are search engine and user friendly urls. index.php is replaced by $this->funkyAlias, equals and ampersands become forward slashes if $this->funkyAlias does end with a / instead of a ? these are rewritten by the url rewriting feature of the webserver. RequestData then is parsed explicitly by getFunkyRequestData. With Funky Urls all urls (including image src, stylesheets and scripts) must be absolute. You must make these urls yourself, the framework will still output normal urls. (Meant to be used in public sites, where Pages usually are only inheriting some very generic methods from PntPage and PntRequestHandler)
isWindows | ( | ) |
loadSettings | ( | ) |
Configures some fields on this and maybe on some other objects, like on the DataBaseConnection. Default implentation is to require ../classes/scriptMakeSettings.php
sanitize | ( | $requestString | ) |
. Properly intiialize a StringConverter and use its ::fromRequestData
setDir | ( | $value | ) |
setDomainDir | ( | $value | ) |
setErrorHandler | ( | ) |
setFunkyAlias | ( | $value | ) |
setGlobalFilters | ( | & | $filters | ) |
array | of PntSqlFilter to be used in the entire application where applicable Default implementation is to store these filters in te session. SearchPages will try to use the global filters, propertypages and parts will not, they may have to be overridden or the domain model has to be made global filter sensitive. Make sure to include eventual additional filter classes before calling this method |
startSession | ( | ) |
Start a session if not already started
tryUseGenericHandlerClass | ( | $forHandler, | |
$requestData, | |||
$handler, | |||
& | $attempted | ||
) |
try to include a generic handler class if not yet included. Generic implementation, includes Object<pntHandler> for pages and <pntHandler> for parts. To be overriden for the inclusion of more specific (but not fully specific) handlers if domain objects are polymorpic
PntRequestHandler | $forHandler | calling this method |
array | $requestData | like $_REQUEST |
string | $handler | pntHandler string (may be empty) |
array | $attempted | reference to array with results of getTryUseClassTryParams (for debugging) |
$absoluteUrls = false |
$baseUrl |
string
$converter |
$dbAddress |
$dbName |
$dbPort |
$dbPwd |
$dbUser |
$debugMode = '' |
string
$dir |
var string $tokenSalt to be set in scriptMakeSettings string
$domainDir |
string
$filters |
$funkyAlias = 'index.php?' |
$funkyUrls = false |
boolean
$httpRequestThrowsExp = true |
$isSiteRunning =true |
$name ="site" |
$os ="linux" |
$requestStartTime |
$sessionStarted = false |
$xFrameOptions = 'DENY' |
string default value for PntPage::printHeaderXframeOptions