frozzare/wp-autoload

Simple autoloader that will autoload classes or traits with namespace prefix

Maintainers

Package info

github.com/wpup/autoload

pkg:composer/frozzare/wp-autoload

Statistics

Installs: 18 229

Dependents: 2

Suggesters: 0

Stars: 14

Open Issues: 0

v2.0.4 2016-05-01 15:41 UTC

This package is auto-updated.

Last update: 2026-03-01 00:09:51 UTC


README

Build Status No Maintenance Intended

Simple autoloader that will autoload classes, interfaces or traits with namespace prefix

Install

composer require frozzare/wp-autoload

Example

Example of your main php file.

require 'vendor/autoload.php';
register_wp_autoload( 'Example\\', __DIR__ . '/src' );

Example of src/class-plugin-loader.php

namespace Example;
class Plugin_Loader {}

Example of src/trait-crawler.php

namespace Example;
trait Crawler {}

Example of src/interface-say.php

namespace Example;
interface Say {}

License

MIT © Fredrik Forsmo