You are here

abstract class ApplicationAdapter in Module Object Oriented Programming API 6

Same name in this branch
  1. 6 component/decorator/moopapi.adapter.inc \ApplicationAdapter
  2. 6 component/decorator/adapter/moopapi.adapter.inc \ApplicationAdapter
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. 7.2 component/decorator/adapter/moopapi.adapter.inc \ApplicationAdapter
  4. 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