V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
picasso250
V2EX  ›  PHP

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

  •  
  •   picasso250 · 2015-02-16 16:31:53 +08:00 · 3129 次点击
    这是一个创建于 3349 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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.
    2 条回复    2015-02-18 12:22:30 +08:00
    Chappako
        1
    Chappako  
       2015-02-18 08:43:14 +08:00
    DB.php, Logger.php, lib.php 这风格,看着头疼
    function try_json_decode, function Service 看着也头疼
    picasso250
        2
    picasso250  
    OP
       2015-02-18 12:22:30 +08:00 via Android
    @Chappako 我来解释一下。首先,我希望尽量简单,所以尽量使用函数,所以函数命名用的是underscore风格。至于说Service,这个函数有点特殊,因为它返回的都是对象,所以也就首字母大写了。
    DB因为是缩写,所以使用全部大写。至于其他,都是依照php api的命名规则的。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4593 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 10:02 · PVG 18:02 · LAX 03:02 · JFK 06:02
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.