2017 © Pedro Peláez
 

library autoload

Automatically and recursively require_once all files in a directory.

image

aaronholbrook/autoload

Automatically and recursively require_once all files in a directory.

  • Monday, May 23, 2016
  • by aaronholbrook
  • Repository
  • 0 Watchers
  • 7 Stars
  • 7,332 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 4 Versions
  • 9 % Grown

The README.md

Autoload Build Status

Purpose

Automatically load all PHP files in the specified directory. Recursively., (*1)

Benefits

  • Rename files with no fear of breaking includes or require calls
  • Encourages using more files to more cleanly organize code into smaller logical chunks
  • Reduce git merge conflicts with other developers

Usage

Install via composer by adding the package to your composer file. "aaronholbrook/autoload": "1.*", does the trick., (*2)

Be sure to include the regular composer load file via require( __DIR__ . '/vendor/autoload.php' );., (*3)

Please note that although similarly named, this Autoload library is meant for loading all PHP files in a given directory. This does NOT function in the manner of the built-in PSR-4 PHP Autoloader., (*4)

Simply load your desired includes or whatever directory by calling:, (*5)

\AaronHolbrook\Autoload\autoload( __DIR__ . 'includes' );

Caveats

Since this is a recursive loader, you should be conscious of what you're placing in your autoloaded directory., (*6)

Things I wouldn't recommend doing: * Placing a big (or any) PHP library in the autoloaded directory (this should/could be handled better with composer anyways!) * Being lax with permissions on a server. Obviously this is never a good idea, but I would be sure that your folder / file permissions are up to snuff (or strange files may be loaded), (*7)

Disclaimer

Be aware that this may not be the right choice for your project. Please be fully aware of what this plugin does and how it works., (*8)

References

The Versions

23/05 2016

dev-master

9999999-dev

Automatically and recursively require_once all files in a directory.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

04/06 2015

1.2

1.2.0.0

Automatically and recursively require_once all files in a directory.

  Sources   Download

MIT

20/05 2015

1.1

1.1.0.0

Automatically and recursively require_once all files in a directory.

  Sources   Download

MIT

07/04 2015

v1.0

1.0.0.0

Automatically and recursively require_once all files in a directory.

  Sources   Download

MIT