File "ModuleRegistry.php"
Full Path: /home/vantageo/public_html/cache/cache/cache/cache/.wp-cli/wp-content/plugins/mojo-marketplace-wp-plugin/vendor/bluehost/endurance-wp-module-loader/includes/ModuleRegistry.php
File size: 771 bytes
MIME-type: text/x-php
Charset: utf-8
<?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 );
}
}