apix/autoloader
最新稳定版本:1.0.0
Composer 安装命令:
composer require apix/autoloader
包简介
Light PSR-0 compliant autoloader for PHP5.3+ namespaces and older PEAR-style classes.
README 文档
README
Apix Autoloader is a light PSR-0 compliant autoloader which can autoload both PHP5.3 namespaces and older PEAR-style classes.
Basic usage
-
At its most basic, it will autoload PSR-0 complient class names in the current include-path:
<?php require '/path_to/Apix/Autoloader.php'; Apix\Autoloader::init();
-
If you want to add some paths to the include-path:
<?php require '/path_to/Apix/Autoloader.php'; $prepend = array('path/to/libs', 'path/to/vendor'); // paths to prepend $append = array('path/to/last/dir'); // paths to append Apix\Autoloader::init($prepend, $append);
Advanced usage
<?php require '/path_to/Apix/Autoloader.php'; $loader = new Apix\Autoloader; $loader->prepend('path/my/libs') ->prepend('path/vendors') ->append('some/other/path'); $loader->register(true); // True to take precedence on registered autoloaders. // False (the default) to follow the stack order.
Installation
-
If you are creating a component that relies on Apix Autoloader locally:
-
either update your
composer.jsonfile:{ "require": { "apix/autoloader": "1.0.*" } } -
or update your
package.xmlfile as follow:<dependencies> <required> <package> <name>apix_autoloader</name> <channel>pear.ouarz.net</channel> <min>1.0.0</min> <max>1.999.999</max> </package> </required> </dependencies>
-
-
For a system-wide installation, use PEAR as follow:
sudo pear channel-discover pear.ouarz.net sudo pear install --alldeps ouarz/apix_autoloader
Checkout pear.ouarz.net for more details.
License
Apix Autoloader is licensed under the New BSD license -- see the LICENSE.txt for the full license details.
统计信息
- 总下载量: 4.74k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2013-01-10