不超过 1000 行的 PHP 框架 https://gitcafe.com/picasso250/PHP-tiny

2015-02-16 16:31:53 +08:00
 picasso250
So the right way is to proxy composer. But I'd like to chose a wrong way.

I wrote a small framework, which has less than 1000 lines. I'll keep it as simple as possible, also helpful.

If a function can do it, I will not bother a class.
3138 次点击
所在节点    PHP
2 条回复
Chappako
2015-02-18 08:43:14 +08:00
DB.php, Logger.php, lib.php 这风格,看着头疼
function try_json_decode, function Service 看着也头疼
picasso250
2015-02-18 12:22:30 +08:00
@Chappako 我来解释一下。首先,我希望尽量简单,所以尽量使用函数,所以函数命名用的是underscore风格。至于说Service,这个函数有点特殊,因为它返回的都是对象,所以也就首字母大写了。
DB因为是缩写,所以使用全部大写。至于其他,都是依照php api的命名规则的。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/171341

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX