99designs/ergo
最新稳定版本:v2.7.0
Composer 安装命令:
composer require 99designs/ergo
包简介
Micro-framework for routing and request/response handling in PHP 5.3
README 文档
README
A light-weight library for processing requests and responses in PHP5.3. Provides a closure-based infrastructure for routing, controllers and templating.
The name is from the latin, Cogito ergo sum. "I think, therefore I am".
Install
Ergo is designed to be easy to install and integrate.
$ pear channel-discover pearhub.org
$ pear install pearhub/Ergo
Alternately, check it out as a submodule and use your own classloader on the classes dir.
Basic Usage
require_once('Ergo/ergo.php');
Ergo::router()->connect('/helloworld', 'helloworld', function() {
return Ergo::template('helloworld.tpl.php', array(
'greeting'=>'Hello World'
));
});
Ergo::router()->connect('/*', 'any', function() {
throw new \Ergo\Http\NotFound("Not implemented yet");
});
How to develop
For running, Ergo has no external dependancies. For development Composer is used to pull in SimpleTest as a dependancy.
To install dependancies via Composer:
$ composer install --dev
Run the test suite:
$ phpunit
PHPUnit 3.7.10 by Sebastian Bergmann.
Configuration read from /home/vagrant/ergo/phpunit.xml.dist
............................................................... 63 / 100 ( 63%)
.....................................
Time: 0 seconds, Memory: 11.25Mb
OK (100 tests, 269 assertions)
Status
Used in several high-volume production websites, including 99designs.com, flippa.com, learnable.com and sitepoint.com.
99designs/ergo 适用场景与选型建议
99designs/ergo 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10.55k 次下载、GitHub Stars 达 32, 最近一次更新时间为 2012 年 05 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「routing」 「response」 「request」 「99designs」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 99designs/ergo 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 99designs/ergo 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 99designs/ergo 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Write down your routing mapping at one place
HTTP request logger middleware for Laravel
Flight routing is a simple, fast PHP router that is easy to get integrated with other routers.
Class to generate a standard structure for api json responses
Adds request-parameter validation to the SLIM 3.x PHP framework
Client for Google Directions API to add interpolated points to a route consisting of given coordinates.
统计信息
- 总下载量: 10.55k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 32
- 点击次数: 22
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-05-31