1 | <?php |
||
16 | final class ApplicationFactory implements ApplicationFactoryInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var DriverContainerInterface |
||
20 | */ |
||
21 | private $driverContainer; |
||
22 | |||
23 | /** |
||
24 | * Constructor. |
||
25 | * |
||
26 | * @param DriverContainerInterface $driverContainer The driver container |
||
27 | */ |
||
28 | public function __construct(DriverContainerInterface $driverContainer = null) |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | public function createApplication($kernel, string $commandName = null, string $commandDescription = null): Application |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command |
||
55 | |||
56 | /** |
||
57 | * Converts the kernel parameter to an object implementing the KernelInterface |
||
58 | * if it is a callable. |
||
59 | * |
||
60 | * Otherwise returns the object directly. |
||
61 | * |
||
62 | * @param KernelInterface|callable $kernel The kernel |
||
63 | * |
||
64 | * @return KernelInterface The kernel as an object implementing the KernelInterface |
||
65 | */ |
||
66 | private function getKernelObject($kernel): KernelInterface |
||
76 | } |
||
77 |