Download the PHP package aurmil/slim3-skeleton without Composer

On this page you can find all versions of the php package aurmil/slim3-skeleton. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package slim3-skeleton

Slim 3 Skeleton

What's included?

Installation

Required: PHP 7 and Composer

Run the following command, replacing [your-project-name] with the name of the folder you want to create.

This skeleton includes a .htaccess file for Apache but Slim supports other Web servers.

Configuration

Configuration files are stored in config folder. There is one YAML file per subject/package, for better readability/management. Other package-specific configuration files can be stored there (and then need to be handled in application code). You can also add whatever you need into app.yaml file as it is up to you to use new configuration values in application code.

Some configuration values can change from an environment to another. Current environment name is read from ENVIRONMENT env variable (default = development). Environment-specific configuration files override values from global configuration. Simply copy-paste one existing YAML file into a folder whose name is a valid environment name. Then edit this file and remove everything except the values you want to change for this environment. There are examples in development-example and production-example folders.

Configuration is available in application through:

Controllers

Controllers can inherit from App\Controllers\Controller class.

It provides a render() method and automatic access to Slim Container entries through $this->my_service_entry_name

Session

In session.yaml configuration file, you can enable or disable session usage.

Session is required if you want to use Flash messages or CSRF protection.

CSRF

If session is enabled, CSRF token is generated for each request.

In security.yaml configuration file, you can enable token persistence: a token is generated for each user but not for each request. Simplifies usage of Ajax but makes application vulnerable to replay attacks if you are not using HTTPS.

If CSRF check fails, the request has a csrf_status attribute set to false. You can check this attribute/value in routes/controllers:

In Twig templates, you can add CSRF hidden fields with:

If you want to make something custom, you can also access to CSRF token values:

Flash Messages

If session is enabled, Flash Messages are available.

To add a message within a route/controller:

To get a message in a Twig template:

To get all messages:

Emails

In swiftmailer.yaml configuration file, you can enable usage of SwiftMailer and then use mailer entry from container as Swift_Mailer object in your code.

By configuring SwiftMailerHandler (+ swiftmailer.yaml file) or NativeMailerHandler in monolog.yaml configuration file, you can enable or disable sending email with Monolog when an error occurs.

HTML meta tags

Every key: value pair you add under metas in app.yaml configuration file 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 compound as follows:

Code quality tools

Run the following commands to check your code:

License

The MIT License (MIT). Please see License File for more information.


All versions of slim3-skeleton with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
akrabat/rka-slim-session-middleware Version ^2.0
monolog/monolog Version ^1.21
roave/security-advisories Version dev-master
slim/csrf Version ^0.8.1
slim/flash Version ^0.2.0
slim/slim Version ^3.5
slim/twig-view Version ^2.2
swiftmailer/swiftmailer Version ^6.0
symfony/yaml Version ^3.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aurmil/slim3-skeleton contains the following files

Loading the files please wait ....