2017 © Pedro Peláez
 

library tortilla

A highly opinionated microframework built with speed and simplicity in mind.

image

linio/tortilla

A highly opinionated microframework built with speed and simplicity in mind.

  • Friday, July 20, 2018
  • by linio
  • Repository
  • 4 Watchers
  • 11 Stars
  • 1,060 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 5 Open issues
  • 12 Versions
  • 18 % Grown

The README.md

Linio Tortilla

Latest Stable Version License Build Status Scrutinizer Code Quality, (*1)

Linio Tortilla provides a very thin web abstraction layer built on top of FastRoute and Pimple. No frills, light and efficient. We believe that the web is just a delivery mechanism and no framework should dictate how you design the architecture of your applications., (*2)

And, just like a tasty super-thin tortilla, you can wrap it around anything you want., (*3)

Install

The recommended way to install Linio Tortilla is through composer., (*4)

{
    "require": {
        "linio/tortilla": "~1.2"
    }
}

If you need help preparing your tortilla, there are recipes available:, (*5)

$ composer create-project linio/burrito-recipe full_app
$ composer create-project linio/tortilla-recipe basic_app

Tests

To run the test suite, you need install the dependencies via composer, then run PHPUnit., (*6)

$ composer install
$ phpunit

Goals

  • Efficiency at all costs
  • Reduce, as much as possible, the amount of moving parts under the hood
  • Tackle complexity

Usage

Preparing your tortilla is quite simple. This is an example of a simple front-controller:, (*7)

<?php

require '../vendor/autoload.php';

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Linio\Tortilla\Application;

$app = new Application();
$app->get('/hello/{name}', function (Request $request, $name) {
    return new Response('Hello ' . $name);
});

$app->run();

You can also define controllers as services instead of closures. Since a Tortilla application is also a Pimple container:, (*8)

<?php

require '../vendor/autoload.php';

use Linio\Tortilla\Application;

$app = new Application();
$app['default'] = function () {
    return new Acme\Controller\DefaultController();
};
$app->get('/hello/{name}', 'default:indexAction');

$app->run();

Defining actions

The Linio Tortilla dispatcher will always dispatch the HTTP request to your controller actions as the first argument. The method signature looks like this:, (*9)


use Symfony\Component\HttpFoundation\Request; public function yourAction(Request $request, $arg1, $arg2, ...);

We do this to keep the dispatching procedure efficient. If we decided to use PHP's reflection mechanism to decide whether to inject the request object or not, we would lose precious milliseconds., (*10)

The Versions

20/07 2018

dev-master

9999999-dev

A highly opinionated microframework built with speed and simplicity in mind.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api middleware framework stack stackphp linio tortilla

28/06 2018

dev-dependabot/composer/symfony/http-foundation-approx-3.2|approx-4.0

dev-dependabot/composer/symfony/http-foundation-approx-3.2|approx-4.0

A highly opinionated microframework built with speed and simplicity in mind.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api middleware framework stack stackphp linio tortilla

28/06 2018

dev-dependabot/composer/phpunit/phpunit-approx-5.6|approx-7.0

dev-dependabot/composer/phpunit/phpunit-approx-5.6|approx-7.0

A highly opinionated microframework built with speed and simplicity in mind.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api middleware framework stack stackphp linio tortilla

28/06 2018

dev-dependabot/composer/symfony/http-kernel-approx-3.2|approx-4.0

dev-dependabot/composer/symfony/http-kernel-approx-3.2|approx-4.0

A highly opinionated microframework built with speed and simplicity in mind.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api middleware framework stack stackphp linio tortilla

28/06 2018

dev-dependabot/composer/symfony/event-dispatcher-approx-3.2|approx-4.0

dev-dependabot/composer/symfony/event-dispatcher-approx-3.2|approx-4.0

A highly opinionated microframework built with speed and simplicity in mind.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api middleware framework stack stackphp linio tortilla

13/04 2017

1.3.0

1.3.0.0

A highly opinionated microframework built with speed and simplicity in mind.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api middleware framework stack stackphp linio tortilla

02/02 2017

1.2.1

1.2.1.0

A highly opinionated microframework built with speed and simplicity in mind.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api middleware framework stack stackphp linio tortilla

20/01 2017

1.2.0

1.2.0.0

A highly opinionated microframework built with speed and simplicity in mind.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api middleware framework stack stackphp linio tortilla

03/11 2016

1.1.0

1.1.0.0

A highly opinionated microframework built with speed and simplicity in mind.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api middleware framework stack stackphp linio tortilla

08/12 2015

1.0.0

1.0.0.0

A highly opinionated microframework built with speed and simplicity in mind.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api middleware framework stack stackphp linio tortilla

23/07 2015

0.2.0

0.2.0.0

A lightweight framework built as middleware, creating the base application to be passed to the stack.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api middleware framework stack stackphp linio tortilla

23/07 2015

0.1.0

0.1.0.0

A lightweight framework built as middleware, creating the base application to be passed to the stack.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

api middleware framework stack stackphp linio tortilla