99designs/ergo 问题修复 & 功能扩展

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

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

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.

统计信息

  • 总下载量: 10.55k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 32
  • 点击次数: 6
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 32
  • Watchers: 51
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-05-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固