Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
optometrists
/
cache
/
cache
/
cache
/
cache
/
.wp-cli
/
wp-content
/
plugins
/
mojo-marketplace-wp-plugin
/
vendor
/
bluehost
/
endurance-wp-module-loader
/
includes
:
ModuleRegistry.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php /** * Class Endurance_ModuleRegistry */ class Endurance_ModuleRegistry { /** * @var Endurance_Collection */ protected static $collection; /** * Fetch the collection of modules. * * @return Endurance_Collection */ public static function collection() { if ( ! isset( self::$collection ) ) { self::$collection = Endurance_Collection::make(); } return self::$collection; } /** * Get a module by name. * * @param string $name * * @return array */ public static function get( $name ) { return self::collection()->get( $name ); } /** * Register a module. * * @param $module array Module definition */ public static function register( $name, array $module ) { self::collection()->put( $name, $module ); } }