rquadling / application-controller
A simple web controller that wraps a Symfony/Application used by RQuadling's projects.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:HTML
Requires
- php: ^7
- guzzlehttp/guzzle: ^6.5
- rquadling/abstract-console: ^1.0.0
- sensiolabs/ansi-to-html: ^1.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpstan/phpstan: ^0.9.2
- phpunit/phpunit: ^6.5
This package is auto-updated.
Last update: 2024-12-10 00:07:17 UTC
README
A simple web controller that wraps a Symfony/Application used by RQuadling's projects.
Installation
Using Composer:
composer require rquadling/application-controller
Usage
Dependency Injection
Within your di.php
, define the response to the request for a \RQuadling\Console\Abstracts\AbstractApplication
.
Example:
\RQuadling\Console\Abstracts\AbstractApplication::class => function ($c) { return $c->get(YourApplication::class); },
Public index.php
<?php require dirname(__DIR__).'/vendor/autoload.php'; \RQuadling\DependencyInjection\ContainerFactory::build() ->get(\RQuadling\Controllers\ApplicationController::class) ->index();