Quick search:

PntHttpRequest
PntRequestHandler
PntSite
PntStringConverter
getRequestHandler
__construct
__toString
checkAlphaNumeric
forwardRequest
getBaseUrl
getContextHref
getController
getConverter
getDebugMode
getDir
getDomainDir
getEventualItemNotFoundMessage
getFormTextPaths
getFormTexts
getGlobalFilters
getHandlersTriedString
getIncludesDir
getInformation
getLabel
getMarkedItemsCollector
getName
getReqParam
getRequestParam
getRequestedObject
getScout
getThisPntHandlerName
getTryUseClassTryParams
getType
getTypeClassDescriptor
getTypeLabel
htOut
initForHandleRequest
queryStringFrom
redirectRequest
setFormTexts
setInformation
setRequestedObject
startSession
toString
tryUseClass
tryUseHandlerClass
useClass


	/** @return PntRequestHandler appropriate to handle a request. 
	 * First a class named <pntType><pntHandler> is tried. 
	 * If it can not be included, Object<pntHandler> will be used. 
	 * If pntHandler param is missing in $requestData a default will be used, see implementation fo this method.
	 * A special case is if pntHandler=(MtoN)PropertyPage: then <pntType>Property<pntProperty>Page is tried first, 
	 * @param array $requestData associative, of string like $_REQUEST, 
	 *      used to decide which class to include and instantiate, 
	 *      and passed to the PntRequestHandler as the request data.
	 * @param string $dir appears to be ignored.  $thisfunction getRequestHandler(->getDir() will be used.
	 * For each class name inclusion is first tried from $this->getDir(), 
	 * 	    If the class is not found, a class from the classes root folder is tried
	 * @throws PntValidationException is no class could be included
	 */
	function getRequestHandler($requestData, $dir=null) {
		if (!$dir) $dir = $this->getDir();
		$id = isSet($requestData["id"]) ? $requestData["id"] : null;
		$specifiedHandler = $handler = isSet($requestData["pntHandler"])
			?  $requestData["pntHandler"] : null;
		$property = ucFirst(isSet($requestData["pntProperty"]) ? $requestData["pntProperty"] : '');
		$type = isSet($requestData["pntType"]) ? $requestData["pntType"] : null;
		if ($handler=='PropertyPage' || $handler=='MtoNPropertyPage')
			$handler = "Property$property".'Page';
		elseif (!$handler) {  //no pntHandler param, use default:
			if ($property == 'pntList')
				$handler = 'IndexPage';
			elseif ($id !== null)
				$handler = 'EditDetailsPage';
			else
				$handler = 'IndexPage';
			$specifiedHandler = $handler;
		}

		$attempted = array();
		$info = null;
		$handlerClass = $type
			? $this->tryUseHandlerClass("$type$handler", $attempted)
			: null;
		if (!$handlerClass && $property) {
			//there is no specific handler for this type and property, try type-handler
			$handler = $specifiedHandler;
			$handlerClass = $this->tryUseHandlerClass("$type$handler", $attempted);
		}
		if (!$handlerClass) 
			//there is no specific handler for this type, try generic handler from same dir
			$handlerClass = $this->controller->tryUseGenericHandlerClass($this, $requestData, $handler, $attempted);

		if (!$handlerClass) {
			$name = $this->getName();
			$errorMessage = "$name - handler not found: $handler, tried: <BR>\n";
			$errorMessage .= $this->getHandlersTriedString($attempted);
			throw new PntValidationException($errorMessage);
		}
//  print "<BR>Handler: $handlerClass $included";
		if (!is_subclassOr($handlerClass, 'PntRequestHandler'))
			throw new PntValidationException($handlerClass. ' does not inherit from PntRequestHandler');
		$result = new $handlerClass($this, $requestData);

		if ($this->getDebugMode() == 'verbose') {
			$info = 'Handlers tried<BR>(one of last two succeeded): ';
			$info .= $this->getHandlersTriedString($attempted);
			$result->setInformation($info);
		}
		return $result;
	}
Copyright (c) MetaClass, 2003-

This code is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

Click here for a copy of the license or see http://www.gnu.org/licenses/ .