rquadling/application-controller

There is no license information available for the latest version (v1.1.1) of this package.

A simple web controller that wraps a Symfony/Application used by RQuadling's projects.

v1.1.1 2020-01-09 13:13 UTC

This package is auto-updated.

Last update: 2024-04-09 22:46:54 UTC


README

Build Status Code Coverage GitHub issues

PHP Version Stable Version

Total Downloads Monthly Downloads Daily Downloads

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();