/** * Construct mixin. * @param App $app Association application. * @param ActiveModel $model Associated model. * @param array $options Associative array of options for mixin. */ public final function __construct(App $app, ActiveModel $model, $options = array()) { parent::__construct($app); $this->model = $model; $this->options = array_merge($this->options, $options); $this->init(); }
/** * Construct database. * @param DatabaseSchema $schema Database schema. * @param array $options Associative array of options for driver. */ public final function __construct(DatabaseSchema $schema, $options = array()) { parent::__construct(); $this->schema = $schema; $this->init($options); $this->migrationAdapter = $this->getMigrationAdapter(); $this->tableNames = $this->getTables(); foreach ($this->tableNames as $table) { $this->tables[$table] = $this->getTable($table); } }
/** * Construct helper. * @param App $app Associated application. */ public final function __construct(App $app) { $this->inheritElements('helpers'); $this->inheritElements('models'); parent::__construct($app); if (isset($this->m->Helpers)) { $this->helperObjects = $this->m->Helpers->getHelpers($this->helpers); } if (isset($this->m->Models)) { $this->modelObjects = $this->m->Models->getModels($this->models); } $this->init(); }
/** * Construct snippet. */ public final function __construct(App $app) { $this->inheritElements('modules'); $this->inheritElements('helpers'); $this->inheritElements('models'); parent::__construct($app); if (isset($this->m->Helpers)) { $this->helperObjects = $this->m->Helpers->getHelpers($this->helpers); foreach ($this->helperObjects as $name => $helper) { $this->view->data->{$name} = $helper; } } if (isset($this->m->Models)) { $this->modelObjects = $this->m->Models->getModels($this->models); } $this->response = new ViewResponse(Http::OK, $this->view); $this->init(); }
/** * Construct controller. * @param App $app Associated application. */ public final function __construct(App $app) { $this->inheritElements('modules'); $this->inheritElements('helpers'); $this->inheritElements('models'); parent::__construct($app); $this->modelObjects = $this->m->Models->getModels($this->models); $helperObjects = $this->m->Helpers->getHelpers($this->helpers); foreach ($helperObjects as $name => $helper) { $this->{$name} = $helper; } $this->name = preg_replace('/Controller$/', '', str_replace($this->app->n('Controllers\\'), '', get_class($this))); $this->response = new ViewResponse(Http::OK, $this->view); $classMethods = get_class_methods($this); $parentMethods = get_class_methods(__CLASS__); $this->actions = array_diff($classMethods, $parentMethods); $this->init(); }
/** * Construct build script. * @param App $app Application. * @param string $path Script path. */ public function __construct(App $app, $path) { parent::__construct($app); require $path; }
public function __construct(App $app) { parent::__construct($app); $this->config = $this->config->getSubset('Routing'); $this->dispatchers = new DispatcherCollection($this); $this->dispatchers->add(new VoidDispatcher()); $this->dispatchers->add(new PathDispatcher($this)); $this->dispatchers->add(new UrlDispatcher($this)); $this->routes = new RoutingTable($this); }
/** * Construct module. * @param App $app Associated application. * @param array $options Associative array of options for module. * @param AuthHelper $Auth The authentication and authorization helper. */ public final function __construct(App $app, $options = array(), AuthHelper $Auth) { parent::__construct($app); $this->options = array_merge($this->options, $options); $this->Auth = $Auth; }
/** * Construct module. * @param App $app Associated application. * @param array $options Associative array of options for module. */ public final function __construct(App $app, $options = array()) { parent::__construct($app); $this->options = array_merge($this->options, $options); }