stvkoch/simple-example

示例:非常简单的模型/SQL 构建器和配置库

dev-master 2013-07-13 13:54 UTC

This package is not auto-updated.

Last update: 2020-01-05 15:52:32 UTC


README

主要要点

这是一个快速示例,展示如何使用 Simple 组件。

安装

git clone https://github.com/stvkoch/Simple-example.git
cd Simple-example
composer.phar install

将 WTF! 转换为 WOOW!

- directory "Config" has files that you can read by \Simple\Config\PHP::get('filename', 'property');
- the file middleware in the directory configuration defines its your middleware stack, you can select which middleware should be executed by setting routes. By default the route is defined by regular expression .* You can deny regular expressions by adding the character !, Example: '!404$'
- example: Suppose you want to run the middleware when the uri match '/users'.
	- \Simple\Middleware\Application::definition(array('namespace'=>'\Lellol\Middleware', class'=>'login', 'function'=>'check', 'id'=>'lellol.login', 'route'=>'^/users'))