2017 © Pedro Peláez
 

library yocto

A really, really, really, really, really, really, really, really small php framework

image

silawrenc/yocto

A really, really, really, really, really, really, really, really small php framework

  • Thursday, April 28, 2016
  • by silawrenc
  • Repository
  • 0 Watchers
  • 1 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Yocto

![Master branch build status][ico-build] PHP ~5.5 Published version ![ISC Licensed][ico-license], (*1)

Yocto is a tiny, stack-based php app framework that acts as nothing more than a wrapper for whichever components you choose. A yocto app instance lets you build a (FIFO) stack of callables, each of which gets called with the app instance as a sole argument. The app instance is constructed with a callback that handles, or delegates service resolution., (*2)

The easiest way to install Yocto is via Composer., (*3)

{
    "require": {
        "silawrenc/yocto": "*"
    }
}

API

Here's a quick example that showcases the API., (*4)


// 1. construct an instance passing in a callback for service resolution $app = new Yocto([$container, 'get']); // 2. add callbacks to the stack (FIFO) $app->add(function ($app) { // returning false inside a callback would ensure no further callbacks are executed return !$app->get('auth')->isAuthenticated(); }); $app->add(function () { echo 'Hello world'; }); // 3. kick things off $app->run(); // ...outputs hello world iff isAuthenticated is true

The Versions

28/04 2016

dev-master

9999999-dev

A really, really, really, really, really, really, really, really small php framework

  Sources   Download

ISC

The Requires

  • php >=5.5

 

The Development Requires

by Simon Lawrence

framework stack micro-framework

28/04 2016

0.0.1

0.0.1.0

A really, really, really, really, really, really, really, really small php framework

  Sources   Download

ISC

The Requires

  • php >=5.5

 

The Development Requires

by Simon Lawrence

framework stack micro-framework