You are here

abstract class Component in Module Object Oriented Programming API 7.2

Same name and namespace in other branches
  1. 6.2 component/moopapi.component.inc \Component
  2. 6 component/moopapi.component.inc \Component
  3. 7 component/moopapi.component.inc \Component

@todo Desc for Component.

Hierarchy

Expanded class hierarchy of Component

File

component/moopapi.component.inc, line 6

View source
abstract class Component {

  // It is intended to store the name of the module (for example, Botcha).
  protected $app_name = '';
  protected $decorators_applied = array();

  // Identifier of a part of an application, each of which has
  // its own controller and model. The main part of each application
  // has id ID_APPLICATION - so we always know where to start.
  protected $id = '';
  const ID_APPLICATION = 'Application';

  // In fact there are only 2 types: controller and model, we
  // need a way to differ them.
  protected $type = 'Component';
  const TYPE_CONTROLLER = 'Controller';
  const TYPE_MODEL = 'Model';

  // For later use.
  // @todo Implement relations.
  // A list of relation names to be initialize at the first launch.
  protected $rltns = array();

  // Relations between parts of the application. Is intended to provide for
  // controllers a way to get and modify common data accordingly.
  protected $relations = array();
  public function __construct($decorators_applied = array(), &$relations = array()) {
    $this->decorators_applied = $decorators_applied;
    $this->relations =& $relations;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Component::$app_name protected property
Component::$decorators_applied protected property
Component::$id protected property
Component::$relations protected property
Component::$rltns protected property
Component::$type protected property 7
Component::ID_APPLICATION constant
Component::TYPE_CONTROLLER constant
Component::TYPE_MODEL constant
Component::__construct public function 4