Request.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2015 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
15  * Controller instances. It is typically instantiated and filled by the
16  * ActionMapper.
17  *
18  * @author ingo herwig <ingo@wemove.com>
19  */
20 interface Request extends ControllerMessage {
21 
22  /**
23  * Initialize the request instance from the HTTP request.
24  * @param $controller The controller to call if none is given in request parameters (optional)
25  * @param $context The context to set if none is given in request parameters (optional)
26  * @param $action The action to perform if none is given in request parameters (optional)
27  */
28  public function initialize($controller=null, $context=null, $action=null);
29 
30  /**
31  * Get the HTTP method of the request
32  * @return String
33  */
34  public function getMethod();
35 
36  /**
37  * Set the desired response format
38  * @param $format A key of the configuration section 'Formats'
39  */
40  public function setResponseFormat($format);
41 
42  /**
43  * Get the message response format. If no explicit format is set, the
44  * format is derived from the Content-Type header value, if existing.
45  * If no format can be derived, the first format in the configuration
46  * key 'Formats' will be used.
47  * @return String
48  */
49  public function getResponseFormat();
50 }
51 ?>
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:20
getMethod()
Get the HTTP method of the request.