silawrenc/yocto 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

silawrenc/yocto

Composer 安装命令:

composer require silawrenc/yocto

包简介

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

README 文档

README

Master branch build status PHP ~5.5 Published version ISC Licensed

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.

The easiest way to install Yocto is via Composer.

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

API

Here's a quick example that showcases the API.

// 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

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: ISC
  • 更新时间: 2016-04-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固