Ejemplo n.º 1
0
 protected function _init(array $data)
 {
     parent::_init($data);
     if (isset($data['account'])) {
         $this->_account = $data['account'];
     }
 }
Ejemplo n.º 2
0
 public function getType($returnLabel = false)
 {
     $typeId = parent::getType();
     if (!$returnLabel) {
         return $typeId;
     }
     return array_search($typeId, Constants::$ACC_TYPE);
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
 public function __construct(Xhb $xhb, $data = array())
 {
     parent::__construct($data);
     $this->setXhb($xhb);
 }