starlit / app
A lightweight MVC style microframework.
Installs: 44 170
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 5
Forks: 1
Open Issues: 2
Requires
- php: >=8.0
- filp/whoops: ^2.0
- monolog/monolog: ^1.0
- psr/container: ^1.0
- starlit/utils: ^1.1
- symfony/http-foundation: ^4.4.47
- symfony/routing: ^4.0
Requires (Dev)
- phpunit/phpunit: ^9.5
- starlit/paginator: ^1.1.0
Suggests
- mustache/mustache: To render mustache templates with PHP
- starlit/paginator: Required for use of the pagination view helper
Provides
This package is auto-updated.
Last update: 2024-11-19 16:43:28 UTC
README
A lightweight MVC style microframework that's basically just a wiring of Symfony's HttpFoundation and Routing components.
Installation
Add the package as a requirement to your composer.json
:
$ composer require starlit/app
Usage example
<?php // In public index.php file $app = new BaseApp(); $request = Symfony\Component\HttpFoundation\Request::createFromGlobals(); $response = $app->handle($request); $response->send(); // IndexController.php class IndexController extends AbstractController { public function indexAction() { $this->view->headline = 'Hello, world!" } } // index.html.php ?> <h1><?=$this->getEscaped('headline')?></h1>
Requirements
- Requires PHP 5.6 or above.
License
This software is licensed under the BSD 3-Clause License - see the LICENSE
file for details.