Download the PHP package species/app without Composer
On this page you can find all versions of the php package species/app. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package app
Species App
Yet another Simple Application Framework.
Glue for Slim and Twig, configured with PHP-DI, written in php 7.2!
Installation
There is a skeleton available if you want to start a new project:
Or use it as a library:
Middleware
Example how to add middleware with PHP-DI config: ``
AddRouteNameToTwigMiddleware
Will add routeName
as a twig global variable, if it can find one.
CsrfValidationMiddleware
Will test POST requests if the csrfToken
field is valid. When invalid,
the session will be cleared, the session ID will be regenerated and an
InvalidCsrfToken
exception will be thrown.
TwigDebugMiddleware
Will add the twig debug extension when twig debug is enabled.
Slim HTTP cache
The slim/http-cache library is also packaged.
Example how to config this middleware: ``
Twig extensions
Example how to add twig globals and extensions with config: ``
CsrfTwigExtension
Adds the function csrfTokenInput()
to render the hidden input field.
Or use csrfToken()
which returns only the token.
ReflectionTwigExtension
Adds the following functions:
fqcn(object $object): string
Returns the fully qualified class name of given object.className(object $object): string
Returns the class name of given object without namespace.instanceOf(object $object, string $class): bool
Tests if given object is an instance of given class.
RouterTwigExtension
Adds the global baseUrl
and following functions:
pathFor(string $name, array $data = [], array $queryParams = []): string
Returns the path for given route.urlFor(string $name, array $data = [], array $queryParams = []): string
Returns the full url for given route.
All versions of app with dependencies
slim/slim Version ^3.12
slim/http-cache Version ^0.4.0
slim/twig-view Version ^2.5
twig/twig Version ^2.9
php-di/php-di Version ^6.0
php-di/slim-bridge Version ^2.0
psr/log Version ^1.1
aura/session Version ^2.1
ext-json Version *