Download the PHP package aurmil/slim2-skeleton without Composer
On this page you can find all versions of the php package aurmil/slim2-skeleton. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aurmil/slim2-skeleton
More information about aurmil/slim2-skeleton
Files in aurmil/slim2-skeleton
Package slim2-skeleton
Short Description A Slim Framework 2 application skeleton
License MIT
Homepage https://github.com/aurmil/slim2-skeleton
Informations about the package slim2-skeleton
Slim 2 Skeleton
What's included?
- Slim v2
- Twig v1
- Monolog v1
- Symfony Yaml Component v3
Installation
Required: Composer
Run the following command, replacing [your-project-name] with the name of the folder you want to create.
- Create a virtual host that points to your project path /public
- For Apache, make sure it has AllowOverride All for Slim URL rewriting
- Make sure var folder is writable by Web server
Web server choice
This skeleton includes a .htaccess file for Apache.
Feel free to read the Slim documentation if your prefer to use another Web server like nginx.
Configuration
Application configuration is stored in /app/config.yml which is divided into 2 main parts: general settings and environment-specific settings.
Environment settings are grouped within sections. A section = an environment. Section name = value of ENVIRONMENT env variable (default = development).
General settings are merged with environment-specific settings. The latter ones overwrite the first ones.
Access config in PHP code
In /app/src/bootstrap.php, the whole configuration is in the $config variable.
In a controller action, only the App section of configuration is available through $app->config('app').
Access config in Twig template
Only the App section of configuration is in the config variable.
Application errors by email
By configuring __App.errors.send_email and App.errors.email__, you can enable or disable sending email with Monolog when an error occurs.
Meta tags
Every key: value pair you add under App.metas will be output in HTML head section as a meta tag.
Title
Page title is a special case. Obviously, title and __title_separator__ entries won't be output as meta tags like the other ones.
A page title is formed as follows:
-
content of the metaTitle block a template child could define
- if App.metas.title is not empty:
- if __App.metas.title_separator__ is not empty: add the separator
- add the config title
License
The MIT License (MIT). Please see License File for more information.
All versions of slim2-skeleton with dependencies
roave/security-advisories Version dev-master
slim/slim Version ^2.6
slim/views Version ^0.1.3
twig/twig Version ~1.0
flynsarmy/slim-monolog Version ^1.0
symfony/yaml Version ~3.0