ComponentManager
class ComponentManager
Components class for TastyIgniter.
Provides utility functions for working with components.
Traits
Singleton trait.
Properties
static protected | $instance | from Singleton | |
array | $registry | ||
protected array | $componentsCallbacks | ||
protected array | $codeMap | ||
protected array | $classMap | ||
protected array | $extensionMap | ||
protected array | $components |
Methods
Scans each extension and loads it components.
Manually registers a component.
Registers a single component.
Returns a list of registered components.
Returns a class name from a component code Normalizes a class name or converts an code to it's class name.
Checks to see if a component has been registered.
Returns component details based on its name.
Returns payment gateway details based on its name.
Makes a component/gateway object with properties set.
Returns a parent extension for a specific component.
Convert class alias to class path
Returns a component property configuration as a JSON string or array.
Returns a component property values.
No description
No description
Details
in
Singleton at line 18
final static
instance()
Create a new instance of this singleton.
in
Singleton at line 28
final static
forgetInstance()
Forget this singleton's instance if it exists
in
Singleton at line 36
final protected
__construct()
Constructor.
in
Singleton at line 44
protected
initialize()
Initialize the singleton free from constructor parameters.
in
Singleton at line 48
__clone()
No description
in
Singleton at line 53
__wakeup()
No description
at line 49
protected void
loadComponents()
Scans each extension and loads it components.
at line 87
void
registerComponents(callable $definitions)
Manually registers a component.
Usage:
ComponentManager::instance()->registerComponents(function($manager){ $manager->registerComponent('account_module/components/Account_module', array( 'name' => 'account_module', 'title' => 'Account Component', 'description' => '..', ); });
at line 99
registerComponent(string $class_path, array $component = null, object $extension = null)
Registers a single component.
at line 136
array
listComponents()
Returns a list of registered components.
at line 153
string
resolve(string $name)
Returns a class name from a component code Normalizes a class name or converts an code to it's class name.
at line 176
bool
hasComponent(string $name)
Checks to see if a component has been registered.
at line 193
mixed|null
findComponent($name)
Returns component details based on its name.
at line 209
mixed|null
getMeta($name)
Returns payment gateway details based on its name.
at line 232
BaseComponent
makeComponent(string $name, PageCode $page = null, array $params = [])
Makes a component/gateway object with properties set.
at line 259
mixed
findComponentExtension(mixed $component)
Returns a parent extension for a specific component.
at line 276
string
convertCodeToPath(string $alias)
Convert class alias to class path
at line 297
array
getComponentPropertyConfig(mixed $component, bool $addAliasProperty = true)
Returns a component property configuration as a JSON string or array.
at line 366
array
getComponentPropertyValues(mixed $component)
Returns a component property values.
at line 380
getComponentPropertyRules($component)
No description
at line 395
protected
checkComponentPropertyType($type)
No description