1 <?php
2 /* --------------------------------------------------------------
3 HttpServiceInterface.inc.php 2015-07-22 gm
4 Gambio GmbH
5 http://www.gambio.de
6 Copyright (c) 2015 Gambio GmbH
7 Released under the GNU General Public License (Version 2)
8 [http://www.gnu.org/licenses/gpl-2.0.html]
9 --------------------------------------------------------------
10 */
11
12
13 /**
14 * Interface HttpServiceInterface
15 *
16 * @category System
17 * @package Http
18 * @subpackage Interfaces
19 */
20 interface HttpServiceInterface
21 {
22 /**
23 * Initializes the http service.
24 *
25 * @param AbstractHttpContextFactory $httpContextFactory Factory instance to create the http context objects.
26 * @param HttpDispatcherInterface $httpDispatcher Dispatcher instance to process the http response object.
27 */
28 public function __construct(AbstractHttpContextFactory $httpContextFactory,
29 HttpDispatcherInterface $httpDispatcher);
30
31
32 /**
33 * Returns an instance of an http context object.
34 *
35 * @return HttpContextInterface Context object which holds information about the current request.
36 */
37 public function getHttpContext();
38
39
40 /**
41 * Handles the current http request by the given context.
42 *
43 * @param HttpContextInterface $httpContext Context object which holds information about the current request.
44 */
45 public function handle(HttpContextInterface $httpContext);
46 }