Class ModuleCollection
A module collection.
- ICanBoogie\Module\ModuleCollection implements ArrayAccess, IteratorAggregate uses ICanBoogie\GetterTrait (not available)
Methods summary
public static
format_model_name( string $module_id
, string $model_id
= 'primary' )
: string
Formats a SQL table name given the module id and the model id.
public
__construct( array $paths
, ICanBoogie\Storage\StorageInterface $cache
= null )
The index for the available modules is created with the accessor object.
public
offsetSet( mixed $id
, mixed $enable
)
Used to enable or disable a module using the specified offset as the module's id.
public
offsetUnset( string $id
)
Disables a module by setting the Descriptor::DISABLED key of its descriptor to true
.
protected
lazy_get_index( void )
: array
Indexes the modules found in the paths specified during construct.
protected
lazy_get_disabled_modules_descriptors( void )
: array
Returns the descriptors of the disabled modules.
protected
lazy_get_enabled_modules_descriptors( void )
: array
Returns the descriptors of the enabled modules.
protected
lazy_get_locale_paths( void )
: array[]string
Returns the paths of the enabled modules which have a locale
folder.
protected
lazy_get_config_paths( void )
: array[]string
Returns the paths of the enabled modules which have a config
folder.
public
order_ids( array $ids
, array $descriptors
= null )
: array
Orders the module ids provided according to module inheritance and weight.
public
usage( string $module_id
, boolean $all
= false )
: integer
Returns the usage of a module by other modules.
public
is_inheriting( string $module_id
, string $parent_id
)
: boolean
Checks if a module inherits from another.
public
resolve_classname( string $unqualified_classname
, string|ICanBoogie\Module
$module
)
: string|false
Resolves a class name using module inheritance.