/wp-autoloader

Autoload classes following the WordPress naming conventions

Primary LanguagePHPMIT LicenseMIT

WPAutoloader

Loads namespaces and classes following the WordPress naming conventions.

Scrutinizer Code Quality Code Climate Code Coverage Build Status

Installation

composer require claudiosanches/wp-autoloader

Usage

require __DIR__ . '/vendor/autoload.php';

use ClaudioSanches\WPAutoloader\Autoloader;

$autoloader = new Autoloader();

// Add namespace.
$autoloader->addNamespace('ClaudioSanches\Foo\Bar', __DIR__ . '/src');

// Register all autoload.
$autoloader->register();

Release History

  • 2017-01-17 - 1.0.0 - Stable release.