You are here

abstract class ApplicationAdapter in Module Object Oriented Programming API 7.2

Same name and namespace in other branches
  1. 6.2 component/decorator/moopapi.adapter.inc \ApplicationAdapter
  2. 6.2 component/decorator/adapter/moopapi.adapter.inc \ApplicationAdapter
  3. 6 component/decorator/moopapi.adapter.inc \ApplicationAdapter
  4. 6 component/decorator/adapter/moopapi.adapter.inc \ApplicationAdapter
  5. 7 component/decorator/adapter/moopapi.adapter.inc \ApplicationAdapter

Hierarchy

Expanded class hierarchy of ApplicationAdapter

File

component/decorator/adapter/moopapi.adapter.inc, line 8

View source
abstract class ApplicationAdapter extends Adapter implements IApplication {
  const ADMIN_PATH = 'admin';
  protected $type = 'Application';
  protected $ctrls = array();
  protected $controllers = array();
  public function __construct($decorators_applied = array(), &$relations = array(), $app) {
    parent::__construct($decorators_applied, $relations, $app);
    $this
      ->getControllers();
  }
  public function getControllers() {
    $controllers = array();
    foreach ($this->ctrls as $ctrl_name) {
      $controllers[$ctrl_name] = $this
        ->getController($ctrl_name);
    }
    return $controllers;
  }
  public function getController($ctrl_name) {
    $this->controllers[$ctrl_name] = ComponentFactory::get($this->app_name, 'Controller', $ctrl_name, $this->decorators_applied, $this->relations);
    return $this->controllers[$ctrl_name];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ApplicationAdapter::$controllers protected property
ApplicationAdapter::$ctrls protected property
ApplicationAdapter::$type protected property Overrides Component::$type
ApplicationAdapter::ADMIN_PATH constant
ApplicationAdapter::getController public function
ApplicationAdapter::getControllers public function Overrides IApplication::getControllers
ApplicationAdapter::__construct public function Overrides Decorator::__construct
Component::$app_name protected property
Component::$decorators_applied protected property
Component::$id protected property
Component::$relations protected property
Component::$rltns protected property
Component::ID_APPLICATION constant
Component::TYPE_CONTROLLER constant
Component::TYPE_MODEL constant
Decorator::$original protected property Here the original value of decorated application is stored.