fruit/core
Composer 安装命令:
composer require fruit/core
包简介
Core components of Fruit framework
README 文档
README
This package is the core of Fruit Framework.
Fruit is still under development, not usable now.
What is Fruit
A fruit is the seed-bearing structure in angiosperms formed from the ovary after flowering. (Wikipedia)
Fruit framework tries to restructure the configuration and helper modules into raw executable PHP code.
Explain it
Basically, Fruit converts dynamic call into static call.
The work flow when a request comes in in most web frameworks is something like
- Execute a special PHP script (entry point), prepare basic data like auto-loading information.
- Load configuration. Mostly by passing config file to a helper class.
- Parse the configuration, load needed modules (like router) and pass related config items to it.
- Find correct controller using router, and execute it.
For knowing which module is "needed", frameworks must prepare a set of data, then parse it to dynamically load the modules.
Fruit works differently.
It provides a command line tool to "compile" your configuration file into an "entry file", and provides a helper object for you to load (and initialize) needed modules on demand. Since the helper object is "generated", it needs not "prepare some data and parse it" to find out correct module you want: such logics are hard-coded in the helper object.
License
Any version of MIT, GPL or LGPL.
统计信息
- 总下载量: 34
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2016-01-25