diff --git a/phpfastcgi/fastcgi-daemon/1.0/config/packages/fastcgi-daemon.yaml b/phpfastcgi/fastcgi-daemon/1.0/config/packages/fastcgi-daemon.yaml new file mode 100644 index 00000000..918f3e94 --- /dev/null +++ b/phpfastcgi/fastcgi-daemon/1.0/config/packages/fastcgi-daemon.yaml @@ -0,0 +1,9 @@ +services: + App\FastCGIKernel: + arguments: ['@App\Kernel'] + + PHPFastCGI\FastCGIDaemon\Driver\DriverContainer: ~ + PHPFastCGI\FastCGIDaemon\Command\DaemonRunCommand: + arguments: ['@App\FastCGIKernel', '@PHPFastCGI\FastCGIDaemon\Driver\DriverContainer', 'fastcgi-daemon:run'] + tags: + - { name: console.command } diff --git a/phpfastcgi/fastcgi-daemon/1.0/manifest.json b/phpfastcgi/fastcgi-daemon/1.0/manifest.json new file mode 100644 index 00000000..1727d5a0 --- /dev/null +++ b/phpfastcgi/fastcgi-daemon/1.0/manifest.json @@ -0,0 +1,6 @@ +{ + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/", + "src/": "%SRC_DIR%/" + } +} diff --git a/phpfastcgi/fastcgi-daemon/1.0/post-install.txt b/phpfastcgi/fastcgi-daemon/1.0/post-install.txt new file mode 100644 index 00000000..ba23d456 --- /dev/null +++ b/phpfastcgi/fastcgi-daemon/1.0/post-install.txt @@ -0,0 +1,10 @@ + + What's next? + + + * Run your application: + 1. Configure your web server + 2. Execute the bin/console fastcgi-daemon:run command; + 3. Browse your application super quickly + + * Read the documentation at https://github.com/PHPFastCGI/FastCGIDaemon \ No newline at end of file diff --git a/phpfastcgi/fastcgi-daemon/1.0/src/FastCGIKernel.php b/phpfastcgi/fastcgi-daemon/1.0/src/FastCGIKernel.php new file mode 100644 index 00000000..632c65d8 --- /dev/null +++ b/phpfastcgi/fastcgi-daemon/1.0/src/FastCGIKernel.php @@ -0,0 +1,27 @@ +kernel = $kernel; + } + + public function handleRequest(RequestInterface $request) + { + $symfonyRequest = $request->getHttpFoundationRequest(); + + $symfonyResponse = $this->kernel->handle($symfonyRequest); + $this->kernel->terminate($symfonyRequest, $symfonyResponse); + + return $symfonyResponse; + } +}