Download the PHP package slim/extras without Composer

On this page you can find all versions of the php package slim/extras. 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 extras

Slim Framework Extras

This repository contains extra resources that complement the Slim Framework, a PHP micro framework that helps you quickly write simple yet powerful web applications.


For custom views we are now recommending using the Slim Views repo instead. We are simplifying the amount of views we officially support and will be splitting up the Slim Extras repo into smaller chunks.

For custom loggers we are now recommending using the Slim Logger repo instead.


Custom Views

This repository contains custom views for your Slim Framework applications. Custom views let you easily use popular third-party templating frameworks, like Twig or Smarty, with your Slim Framework application.

This example demonstrates how to use the custom Twig view in your Slim Framework application:

<?php
// Setup custom Twig view
$twigView = new \Slim\Extras\Views\Twig();

// Instantiate application
$app = new \Slim\Slim(array(
    'view' => $twigView
));

This example assumes you are autoloading dependencies using Composer. If you are not using Composer, you must manually require the custom view class before instantiating it.

Read the Slim Framework documentation to learn how to write your own custom view.

Middleware

This repository also contains middleware for your Slim Framework application. This example demonstrates how to apply HTTP basic authentication to a Slim Framework application:

<?php
$app = new \Slim\Slim();
$app->add(new \Slim\Extras\Middleware\HttpBasicAuth('username', 'password'));

This example assumes you are autoloading dependencies using Composer. If you are not using Composer, you must manually require the custom middleware class before instantiating it.

Log Writers

This repository also contains custom log writers for your Slim Framwork application. This example demonstrates how to use the custom DateTimeLogWriter to write rolling log files from your Slim Framework application:

<?php
$app = new \Slim\Slim(array(
    'log.writer' => new \Slim\Extras\Log\DateTimeFileWriter(array(
        'path' => './logs',
        'name_format' => 'Y-m-d',
        'message_format' => '%label% - %date% - %message%'
    ))
));

This example assumes you are autoloading dependencies using Composer. If you are not using Composer, you must manually require the log writer class before instantiating it.

Author

The Slim Framework is created and maintained by Josh Lockhart. Josh is a senior web developer at New Media Campaigns. Josh also created and maintains PHP: The Right Way, a popular movement in the PHP community to introduce new PHP programmers to best practices and good information.

The Slim Framework Extras repository is maintained by Andrew Smith.

License

The Slim Framework is released under the MIT public license.

http://www.slimframework.com/license


All versions of extras with dependencies

PHP Build Version
Package Version
Requires slim/slim Version >=2.0.0
php Version >=5.3.0
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 slim/extras contains the following files

Loading the files please wait ....