lib/private/AppFramework/Http/Dispatcher.php
/**
	 * Uses the reflected parameters, types and request parameters to execute
	 * the controller
	 * @param Controller $controller the controller to be executed
	 * @param string $methodName the method on the controller that should be executed
	 * @return Response
	 */
Uses the reflected parameters, types and request parameters to execute
the controller
@param Controller $controller the controller to be executed
@param string $methodName the method on the controller that should be executed
@return Response
Uses the reflected parameters types and request parameters to execute the controller @param Controller $controller the controller to be executed @param string $methodName the method on the controller that should be executed @return Response
private function executeController($controller, $methodName) {
		$arguments = array();
		$types = array('int', 'integer', 'bool', 'boolean', 'float');
		foreach($this->reflector->getParameters() as $param => $default) {
			$value = $this->request->getParam($param, $default);
			$type = $this->reflector->getType($param);
			if(($type === 'bool' || $type === 'boolean') &&
				$value === 'false' &&
				(
					$this->request->method === 'GET' ||
					strpos($this->request->getHeader('Content-Type'),
						'application/x-www-form-urlencoded') !== false
				)
			) {
				$value = false;
			} elseif($value !== null && in_array($type, $types)) {
				settype($value, $type);
			}
			$arguments[] = $value;
		}
		$response = call_user_func_array(array($controller, $methodName), $arguments);
		if($response instanceof DataResponse || !($response instanceof Response)) {
			$format = $this->request->getParam('format');
			if($format === null) {
				$headers = $this->request->getHeader('Accept');
				$format = $controller->getResponderByHTTPHeader($headers, null);
			}
			if ($format !== null) {
				$response = $controller->buildResponse($response, $format);
			} else {
				$response = $controller->buildResponse($response);
			}
		}
		return $response;
	}
private function executeController ( $ controller , $ methodName ) { $ arguments = array ( ) ; $ types = array ( 'int' , 'integer' , 'bool' , 'boolean' , 'float' ) ; foreach ( $ this -> reflector -> getParameters ( ) as $ param => $ default ) { $ value = $ this -> request -> getParam ( $ param , $ default ) ; $ type = $ this -> reflector -> getType ( $ param ) ; if ( ( $ type === 'bool' || $ type === 'boolean' ) && $ value === 'false' && ( $ this -> request -> method === 'GET' || strpos ( $ this -> request -> getHeader ( 'Content-Type' ) , 'application/x-www-form-urlencoded' ) !== false ) ) { $ value = false ; } elseif ( $ value !== null && in_array ( $ type , $ types ) ) { settype ( $ value , $ type ) ; } $ arguments [ ] = $ value ; } $ response = call_user_func_array ( array ( $ controller , $ methodName ) , $ arguments ) ; if ( $ response instanceof DataResponse || ! ( $ response instanceof Response ) ) { $ format = $ this -> request -> getParam ( 'format' ) ; if ( $ format === null ) { $ headers = $ this -> request -> getHeader ( 'Accept' ) ; $ format = $ controller -> getResponderByHTTPHeader ( $ headers , null ) ; } if ( $ format !== null ) { $ response = $ controller -> buildResponse ( $ response , $ format ) ; } else { $ response = $ controller -> buildResponse ( $ response ) ; } } return $ response ; }
Uses the reflected parameters, types and request parameters to execute
 the controller
 @param Controller $controller the controller to be executed
 @param string $methodName the method on the controller that should be executed
 @return Response
Uses the reflected parameters types and request parameters to execute the controller @param Controller $controller the controller to be executed @param string $methodName the method on the controller that should be executed @return Response
// valid types that will be casted // try to get the parameter from the request object and cast // it to the type annotated in the @param annotation // if this is submitted using GET or a POST form, 'false' should be // converted to false // format response // get format from the url format or request format parameter // if none is given try the first Accept header