Request.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2017 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
11 namespace wcmf\lib\presentation;
12 
13 /**
14  * Request holds the request values that are used as input to Controller instances.
15  *
16  * @author ingo herwig <ingo@wemove.com>
17  */
18 interface Request extends ControllerMessage {
19 
20  /**
21  * Set the Response instance belonging to the request and vice versa.
22  * @param $response Response
23  */
24  public function setResponse(Response $response);
25 
26  /**
27  * Get the Response instance belonging to the request.
28  * @return Response
29  */
30  public function getResponse();
31 
32  /**
33  * Initialize the request instance from the HTTP request.
34  * @param $controller The controller to call if none is given in request parameters (optional)
35  * @param $context The context to set if none is given in request parameters (optional)
36  * @param $action The action to perform if none is given in request parameters (optional)
37  */
38  public function initialize($controller=null, $context=null, $action=null);
39 
40  /**
41  * Get the HTTP method of the request
42  * @return String (uppercase)
43  */
44  public function getMethod();
45 
46  /**
47  * Set the desired response format
48  * @param $format A key of the configuration section 'Formats'
49  */
50  public function setResponseFormat($format);
51 
52  /**
53  * Get the message response format. If no explicit format is set, the
54  * format is derived from the Content-Type header value, if existing.
55  * If no format can be derived, the first format in the configuration
56  * key 'Formats' will be used.
57  * @return String
58  */
59  public function getResponseFormat();
60 }
61 ?>
Response holds the response values that are used as output from Controller instances.
Definition: Response.php:20
Presentation related interfaces and classes.
Definition: namespaces.php:59
setResponseFormat($format)
Set the desired response format.
Messages are sent between Controllers and are used to transfer data between them. ...
initialize($controller=null, $context=null, $action=null)
Initialize the request instance from the HTTP request.
getResponseFormat()
Get the message response format.
Request holds the request values that are used as input to Controller instances.
Definition: Request.php:18
getResponse()
Get the Response instance belonging to the request.
setResponse(Response $response)
Set the Response instance belonging to the request and vice versa.
getMethod()
Get the HTTP method of the request.