首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏PHP在线

    拒绝重复造轮子,用composer搞自己的框架(1)

    PSR-0 (Autoloading Standard) 自动加载标准 2. PSR-1 (Basic Coding Standard) 基础编码标准 3. PSR-4 (Improved Autoloading) 自动加载优化标准 之后,在此标准之上,Composer 横空出世!

    1.2K50发布于 2018-03-08
  • 来自专栏PHP在线

    PHP的PSR系列规范都有啥内容

    PSR 是PHP Standard Recommendation的简写,它其实应该叫PSRs,即系列推荐标准:目前通过的规范有PSR-0(Autoloading Standard)、PSR-1(Basic Coding Standard)、PSR-2(Coding Style Guide)、PSR-3(Logger Interface)、PSR-4(Improved Autoloading)。 PSR-0(Autoloading Standard) PSR-0即类自动加载规范(原文:官网、GitHub)。从2014-10-21日起,该规范被标记为Deprecated,由PSR-4替代。 PSR-4(Improved Autoloading) PSR-4即改进版的自动加载规范(原文:官网、GitHub)。它是PSR-0规范的接替者。它可以与任何其它的自动加载规范兼容,包括PSR-0。

    1.2K70发布于 2018-03-08
  • 来自专栏小狼的世界

    PHP中Autoload使用中的一些问题

    通过阅读了 Autoloading in PHP 这篇文章,我理解的 Autoload 的加载机制,当通过 new 来实例化一个类时,PHP会通过定义的__autoload 函数加载相应的文件,如果这个类文件使用了 参考资料: 1、Autoloading in PHP 2、Autoloading Classes 3、Autoload problem with static variables 4、Class autoloades

    80220发布于 2018-07-25
  • 来自专栏佳爷的后花媛

    composer autoloader

    1 什么是autoloading? “喵喵,你觉得写一长串需要包含的文件放在脚本的开头,是不是很烦人的事?” “烦人?” “这就是autoloading,来,为夫和你说说” 2 创建一个autoloader “按照你说的,把所有的文件都放进去” <? 这时候autoloading铛铛铛登场了: <?

    1K10发布于 2020-04-23
  • 来自专栏技术派

    PHP命名空间与自动加载类详解

    php namespace AutoLoading; class loading { public static function autoload($className) { //把 转换层 / php 5.3 加入的 //也必须是得是static静态方法调用,然后就像加载namespace的方式调用,注意:不能使用use spl_autoload_register("\AutoLoading\

    1.1K40发布于 2021-07-13
  • 来自专栏sunsky

    PHP代码规范

    PSR 原来有五个规范,分别是: PSR-0 (Autoloading Standard) 自动加载标准。 PSR-1 (Basic Coding Standard) 基础编码标准。 PSR-4 (Improved Autoloading) 自动加载的增强版,可以替换掉 PSR-0 了。 今天我们的代码规范是基于以上规范进行了整理。 1、PHP 源文件只能使用 <?php 和 <?

    3.4K61发布于 2020-08-20
  • 来自专栏好派笔记

    分享一个php单元测试框架PHPUnit

    通常,但是,你使用 --bootstrap 指导PHPUnit命令行测试前包括启动脚本设置 autoloading 对于要测试的类。

    74000发布于 2021-10-07
  • 来自专栏landv

    [codeigniter4]Upgrading from 3.x to 4.x

    locating, within the App (application) and CodeIgniter (i.e. system) top level namespaces; with composer autoloading

    84310发布于 2020-03-04
  • 来自专栏IT码农

    Composer系列之二

    --optimize-autoloader (-o): 转换 PSR-0/4 autoloading 到 classmap 可以获得更快的加载支持。 --optimize-autoloader (-o): 转换 PSR-0/4 autoloading 到 classmap 可以获得更快的加载支持。

    1.4K21发布于 2019-09-03
  • 来自专栏开源技术小栈

    如何快速理解PHP中使用FastRoute进行路由

    See https://getcomposer.org/root-version Generating autoload files Generated autoload files PSR-4 autoloading

    62210编辑于 2024-11-21
  • 来自专栏决胜机器学习

    ModernPHP读书笔记(二) ——PHP开发标准

    2、PSR-2(Coding Style Guide) 编码风格向导 3、PSR-3(Logger Interface) 日志记录器接口 4、PSR-4(Autoloading

    1.1K100发布于 2018-03-07
  • 来自专栏Python每日一库

    modelscope-studio: 更定制化更丰富的 Gradio 三方组件库

    gr.Blocks() as demo: with ms.Application(): with antd.ConfigProvider(): with ms.AutoLoading

    85011编辑于 2025-01-17
  • 来自专栏IT码农

    composer系列之三

    autoload": { "classmap": [ "src/" ] }, Files 如果你想要明确的指定,在每次请求时都要载入某些文件,那么你可以使用 'files' autoloading

    1.3K21发布于 2019-09-02
  • 来自专栏开源技术小栈

    workerman5.0 和 swoole5.0 实现一键协程

    caused by coroutine switching during the process of class autoloading

    86210编辑于 2024-04-28
  • 来自专栏开源技术小栈

    如何发布一个自己的Composer依赖包

    PSR-4 autoloading configured.

    1.1K10编辑于 2024-01-02
  • 来自专栏菜皮日记

    PHP Composer 的自动加载

    规范中的 PSR-4 代表:Autoloading Standard,即自动加载规范。

    1.6K10编辑于 2023-12-18
  • 来自专栏北溟有鱼QAQ

    PHP自动加载与composer自动加载

    更新了配置文件都需要执行一下命令才能生效 composer dumpautoload files 如果你想要明确的指定,在每次请求时都要载入某些文件,那么你可以使用’files’ autoloading

    2.8K10发布于 2019-12-18
  • 来自专栏仙士可博客

    PHP自动加载与composer自动加载

    更新了配置文件都需要执行一下命令才能生效 composer dumpautoload files  如果你想要明确的指定,在每次请求时都要载入某些文件,那么你可以使用’files’ autoloading

    2.8K10发布于 2019-12-19
  • 来自专栏友人a的笔记丶

    PHP如何使用Composer来自动加载项目文件?

    在composer.json中的命名空间必须以\结尾,以避免名字冲突 如果想要明确的指定,在每次请求时都要载入某些文件,那么你可以使用 files autoloading,通常作为函数库的载入方式(而非类库

    4.9K40编辑于 2023-02-17
  • 来自专栏宣言(Siam)博客

    PHP自动加载与composer自动加载

    更新了配置文件都需要执行一下命令才能生效 composer dumpautoload ** files ** 如果你想要明确的指定,在每次请求时都要载入某些文件,那么你可以使用’files’ autoloading

    3.2K20发布于 2019-12-18
领券