FailureController.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  */
12 
14 
15 /**
16  * FailureController is used to signal a failure to the user.
17  *
18  * The controller supports the following actions:
19  *
20  * <div class="controller-action">
21  * <div> __Action__ _default_ </div>
22  * <div>
23  * Display the errors contained in the request.
24  * | Parameter | Description
25  * |-----------------------|-------------------------
26  * | _out_ `errors` | Array of error messages
27  * | __Response Actions__ | |
28  * | `ok` | In all cases
29  * </div>
30  * </div>
31  *
32  * @author ingo herwig <ingo@wemove.com>
33  */
35 
36  /**
37  * @see Controller::doExecute()
38  */
39  protected function doExecute() {
40  $request = $this->getRequest();
41  $response = $this->getResponse();
42  $response->setErrors($request->getErrors());
43  $response->setContext('');
44  $response->setAction('ok');
45  }
46 }
47 ?>
getRequest()
Get the Request instance.
Definition: Controller.php:190
Controller is the base class of all controllers.
Definition: Controller.php:48
Application controllers.
Definition: namespaces.php:3
FailureController is used to signal a failure to the user.
getResponse()
Get the Response instance.
Definition: Controller.php:198