protected function _init(array $data) { parent::_init($data); if (isset($data['account'])) { $this->_account = $data['account']; } }
public function getType($returnLabel = false) { $typeId = parent::getType(); if (!$returnLabel) { return $typeId; } return array_search($typeId, Constants::$ACC_TYPE); }
public function __construct(Xhb $xhb, $account = null, array $data = array()) { parent::__construct($data); $this->setXhb($xhb); if (is_numeric($account)) { $account = $xhb->getAccount($account); } $this->_account = $account; }
public function __construct($data = array()) { parent::__construct($data); if (isset($data['resource_config']['type']) && $data['resource_config']['type']) { $this->_resourceType = ucfirst($data['resource_config']['type']); } else { throw new \Exception('Missing resource configuration'); } $this->setXhb($this); // Init own resource instance $this->getResource(true, $data); }
public function __construct(Xhb $xhb, $data = array()) { parent::__construct($data); $this->setXhb($xhb); }