Download the PHP package dida/autoloader without Composer

On this page you can find all versions of the php package dida/autoloader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package autoloader

Autoloader

Autoloader 是一个强大的类载入器。它是 Dida 框架 的一部分。

特点

安装

方法 1: (推荐)下载最新的 Autoloader.php 文件,然后直接在需要的地方引入它。

下载网址如下:

然后在你的项目中直接 include 进去,举例如下:

推荐采用这种方式,AutoLoad 的使用流程清晰明了。

方法 2: 用 Composer 安装。

如果你是用这个方式调用本类的话,尤其需要注意查找未知类的匹配优先顺序问题。

推荐方法 1 而不是方法 2 的原因

方法 1 和方法 2 的主要区别在于 搜索的优先顺序

在实际项目中,想使用 AutoLoader 的目的,绝大多数都是要使用自定义的类,而不是 Composer 的 vendor 里面的库,所以用方法 1 能更好达成此目的。

API

初始化

四种匹配模式

工具函数

用法

如果是采用 Classmap 匹配模式时,相应的 mapfile 文件的示例如下:

作者

鸣谢

版权声明

版权所有 (c) 上海宙品信息科技有限公司。
Copyright (c) Zeupin LLC. http://zeupin.com

源代码采用 MIT 授权协议。
Licensed under The MIT License.

如需在您的项目中使用,必须保留本源代码中的完整版权声明。
Redistributions of files MUST retain the above copyright notice.


All versions of autoloader with dependencies

PHP Build Version
Package Version
Requires php Version ^5.4 || ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dida/autoloader contains the following files

Loading the files please wait ....