public function __construct(array $settings) { parent::__construct(); $this->Wp = GummRegistry::get('Helper', 'Wp'); if (!isset($settings['path'])) { trigger_error(__('Cannot intialize external plugin without supplying path', 'gummfw')); } if ($this->Wp->isPluginActive($settings['path'])) { $this->initialize(); } }
/** * Constructor * * @param Controller $controller A controller object to pull View::__passedArgs from. * @return View */ public function __construct(&$controller = null) { if ($controller) { $this->__passedArgs = $controller->viewVars; $this->controller =& $controller; $this->action = $this->controller->action; $this->autoRender = $this->controller->autoRender; $this->hasRendered =& $this->controller->hasRendered; $this->importHelpers(); } parent::__construct(); }
public function __construct() { parent::__construct(); if (!$this->name) { $this->name = str_replace('Helper', '', get_class($this)); } if (isset($this->data['_mergeonsave']) && (int) $this->data['_mergeonsave'] === 0) { $this->mergeOnSave = false; } foreach ($this->helpers as $helper) { $this->{$helper} = GummRegistry::get('Helper', $helper); } GummRegistry::updateRegistry('Helper_' . $this->name, $this); }
public function __construct() { parent::__construct(); $thisclassVars = get_class_vars(get_class($this)); $selfClassVars = get_class_vars('Controller'); $this->name = $this->getName(); if (isset($thisClassVars['helpers'])) { $this->helpers = array_merge($selfClassVars['helpers'], $thisClassVars['helpers']); } foreach ($this->components as $component) { $this->{$component} = GummRegistry::get('Component', $component); } foreach ($this->uses as $model) { $this->{$model} = GummRegistry::get('Model', $model); } }
/** * Constructor for the GummModel class * Initializes the $data parameter, cleans the security fields from the $_POST variable * * @return void */ public function __construct() { parent::__construct(); if (!$this->name) { $this->name = str_replace('Model', '', get_class($this)); } if (isset($this->data['_mergeonsave']) && (int) $this->data['_mergeonsave'] === 0) { $this->mergeOnSave = false; } GummRegistry::updateRegistry('Model_' . $this->name, $this); foreach ($this->inRelation as $modelInRelation) { if (!isset($this->{$modelInRelation})) { $this->{$modelInRelation} = GummRegistry::get('Model', $modelInRelation); } } }
/** * @return void */ public function __construct() { parent::__construct(); $this->RequestHandler = GummRegistry::get('Component', 'RequestHandler'); }
public function __construct($params = array()) { parent::__construct(); $this->sanitize($params); }
/** * @param array $data * @return void */ public function __construct($data = array()) { parent::__construct(); foreach ($this->helpers as $helper) { $this->{$helper} = GummRegistry::get('Helper', $helper); } if (isset($data['settings'])) { $this->setParams($data['settings']); } if (isset($data['postId'])) { $this->postId = $data['postId']; } if (!$this->name) { $this->name = str_replace('_layout_element', '', Inflector::underscore(get_class($this))); } $this->htmlElementId = Inflector::slug($this->name, '-') . '-element-' . $this->id(); if ($this->supports('plugin')) { $this->isPluginInstalled(true); } $this->originalLayoutPosition = $this->layoutPosition; $this->initialize(); }
public function __construct() { parent::__construct(); $this->Wp = GummRegistry::get('Helper', 'Wp'); }