Libraries: Master: Components Overview

Aus CodeCoupler Wiki
Zur Navigation springen Zur Suche springen

By default CodeCoupler the following components are enabled:


Components Configuration

Components can be configured in application/config/master.php. Every component will be described in one array with three keys:

  • enabled: If TRUE the component will be enabled by default.
  • config: This value ist component specific. Please read the chapter Components: Overview.
  • depends: Thia array tells the framework on what components this one depends. Normally you do not have to modify this.

Enable/Disable Components Dynamicaly

Everywhere in your code you can enable or disable components. You do not have to worry about enabling depending components or the order of the components. Use the following function to handle components:

  • $this->master->enable_component($key): Enable component. Use the key of the component.
  • $this->master->disable_component($key): Enable component. Use the key of the component.
  • $this->master->is_component_enabled($key): Returns TRUE if the component is enabled, otherwise FALSE. Use the key of the component.

You can find an overview of all components, their keys and how to add you own components here: Components: Overview

Development

  • Use always <?= base_url ?>. The url-helper is autoloaded.