diff --git a/src/ApplicationFactory.php b/src/ApplicationFactory.php new file mode 100644 index 0000000..495a75f --- /dev/null +++ b/src/ApplicationFactory.php @@ -0,0 +1,51 @@ +daemonFactory = new DaemonFactory; + } else { + $this->daemonFactory = $daemonFactory; + } + } + + /** + * {@inheritdoc} + */ + public function createApplication($kernel, $commandName = 'run', $commandDescription = 'Run a FastCGI daemon') + { + $command = $this->createCommand($kernel, $commandName, $commandDescription); + + $application = new Application; + $application->add($command); + + return $application; + } + + /** + * {@inheritdoc} + */ + public function createCommand($kernel, $commandName = 'run', $commandDescription = 'Run a FastCGI daemon') + { + return new DaemonRunCommand($commandName, $commandDescription, $this->daemonFactory, $kernel); + } +} diff --git a/src/ApplicationFactoryInterface.php b/src/ApplicationFactoryInterface.php new file mode 100644 index 0000000..a16f2a0 --- /dev/null +++ b/src/ApplicationFactoryInterface.php @@ -0,0 +1,31 @@ +