Skip to content

A base from which to build plugins with sensible defaults and moden features.

License

Notifications You must be signed in to change notification settings

MyBBStuff/Plugins.Core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Plugins.Core

A base from which to build plugins with sensible defaults and modern features.

##ClassLoader

The Plugins.Core package contains a simple MybbStuff_Core_ClassLoader class which can be used to autoload classes following the PSR conventions, but using PEAR style class naming.

For example, see the following classes and their expected paths (after having registered the namespace as seen below):

defined('MYBBSTUFF_CORE_PATH') or define('MYBBSTUFF_CORE_PATH', MYBB_ROOT . 'inc/plugins/MybbStuff/Core/');
define('SIMPLELIKES_PLUGIN_PATH', MYBB_ROOT . 'inc/plugins/MybbStuff/SimpleLikes');

require_once MYBBSTUFF_CORE_PATH . 'ClassLoader.php';

$classLoader = new MybbStuff_Core_ClassLoader();
$classLoader->registerNamespace('MybbStuff_SimpleLikes', array(SIMPLELIKES_PLUGIN_PATH));
MybbStuff_SimpleLikes_LikeManager           ====> inc/plugins/MybbStuff/SimpleLikes/LikeManager
MybbStuff_SimpleLikes_Import_LikeManager    ====> inc/plugins/MybbStuff/SimpleLikes/Import/LikeManager

About

A base from which to build plugins with sensible defaults and moden features.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages