-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathApplication.php
More file actions
36 lines (32 loc) · 817 Bytes
/
Copy pathApplication.php
File metadata and controls
36 lines (32 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
namespace Mbunge\PhpAttributes\Example;
/**
* The Application acts as some kind of front controller and
* uses an application processor.
*
* The application is not aware of concrete implementation details of processor
*
* Class Application
* @copyright Marco Bunge <marco_bunge@web.de>
* @package Mbunge\PhpAttributes\Example;
*/
final class Application implements ApplicationController
{
/**
* Application constructor.
* @param ApplicationProcessor $processor
*/
public function __construct(
private ApplicationProcessor $processor
)
{
$this->processor->init($this);
}
/**
* @param object $input
* @return object
*/
public function execute(object $input): object {
return $this->processor->process($input);
}
}