Download the PHP package rah/rah_autoload without Composer
On this page you can find all versions of the php package rah/rah_autoload. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rah/rah_autoload
More information about rah/rah_autoload
Files in rah/rah_autoload
Package rah_autoload
Short Description Loads Composer generated autoload files in Textpattern CMS
License GPL-2.0
Homepage https://github.com/gocom/rah_autoload
Informations about the package rah_autoload
h1. rah_autoload
"Download":https://github.com/gocom/rah_autoload/releases | "Packagist":https://packagist.org/packages/rah/rah_autoload | "Issues":https://github.com/gocom/rah_autoload/issues
This "Textpattern CMS":https://textpattern.com plugin automatically loads the autoload file generated by "Composer":https://getcomposer.org dependency manager. Fits well together with "textpattern/installer":https://packagist.org/packages/textpattern/installer and "textpattern/lock":https://packagist.org/packages/textpattern/installer to complete the Textpattern and Composer integration. Rah_autoload removes any need to manually import the autoload file, and allows plugins access their dependencies.
h2. Install
Using "Composer":https://getcomposer.org:
bc. $ composer require rah/rah_autoload
Or "download":https://github.com/gocom/rah_autoload/releases an installer package.
h2. Developer
h3. Using in your plugins
To use rah_autoload with your Composer distributed plugins, just add it as a dependency to your @composer.json@:
bc. { "require": { "rah/rah_autoload": "*" } }
And that's it. Rah_autoload gets installed with your plugin, the autoload file is loaded in Textpattern and you can access your dependencies.
h3. Invoking the autoloader
The plugin and autoloader is invoked automatically as long as the plugin is enabled, but the autoloader can be invoked manually too, once installed. Normally this isn't required, but if you want to make sure autoloader is initialized before you try to access your dependencies, you may invoke the plugin by our own in your plugin.
You will be able to invoke the autoloader like any other plugin using Textpattern's native plugin management functions such as @load_plugin()@ and @require_plugin()@. You don't need to do anything other than load the plugin.
bc. load_plugin('rah_autoload', true);
The above will initialize the autoloader as long as its installed, regardless of its type or status. The plugin and autoloader is initialized only once. Subsequent load and require statements don't have any impact or eat resources. This basically means you can safely "spam" the @load_plugin()@ when ever you need an autoloader or class maps generated by Composer.
h2. Changelog
h3. Version 0.3.2 - 2019/03/24
- No actual changes, just quality of life.
h3. Version 0.3.1 - 2014/03/28
- Updated source comment.
h3. Version 0.3.0 - 2014/03/24
- Removed: "xrstf/composer-php52":https://packagist.org/packages/xrstf/composer-php52 support.
- Removed: Preferences. Due to textpattern-installer changes, the plugin can now work automatically. As plugin source is loaded from vendors directory, the source file itself will be able to tell where the autoloader is located.
h3. Version 0.2.1 - 2013/05/20
- Fixed: Reported version number.
h3. Version 0.2.0 - 2013/05/20
- Added: Can load PHP 5.2.0 autoloader files generated by "xrstf/composer-php52":https://packagist.org/packages/xrstf/composer-php52.
- Added: Preferences that let you manually configure the imported autoload files, and disable searching.
h3. Version 0.1.0 - 2013/05/08
- Initial release.