Exemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param  int $applicantId optional
  * @return void
  */
 public function __construct(array $config = array(), $applicantId = null)
 {
     parent::__construct($config);
     if ($applicantId) {
         $this->id = $applicantId;
     }
 }
Exemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param  int $id optional
  * @return void
  */
 public function __construct(array $config = array(), $id = null)
 {
     parent::__construct($config);
     if ($id) {
         $this->tqa_id = $id;
     }
 }
Exemplo n.º 3
0
 /**
  * Constructor.
  *
  * @param  int $testId optional
  * @return void
  */
 public function __construct(array $config = array(), $testId = null)
 {
     parent::__construct($config);
     if ($testId) {
         $this->t_id = $testId;
     }
 }
Exemplo n.º 4
0
 /** \zfb_read ActiveRow_Abstract..__construct */
 public function __construct(array $config = array())
 {
     if ($this->_finishDataMap || isset($config['finishDataMap'])) {
         if (isset($config['table']) && $config['table'] instanceof Zend_Db_Table_Abstract) {
             $table = $config['table'];
         } elseif ($this->_tableClass !== null) {
             $table = $this->_getTableFromString($this->_tableClass);
         } else {
             //table is undefined: not completing dataMap
             parent::__construct($config);
             return;
         }
         $cols = $table->info('cols');
         $result = array();
         foreach ($cols as $colName) {
             if (($key = array_search($colName, $this->_dataMap)) !== FALSE) {
                 $result[$key] = $colName;
             } else {
                 $result[$this->_dataMapTransform($colName)] = $colName;
             }
         }
         $this->_dataMap = $result;
     }
     parent::__construct($config);
 }
Exemplo n.º 5
0
 public function __construct($config = array())
 {
     if (array_key_exists('data', $config)) {
         $config['data']['id'] = (int) $config['data']['id'];
         $config['data']['randomNumber'] = (int) $config['data']['randomNumber'];
     }
     parent::__construct($config);
 }
Exemplo n.º 6
0
 public function __construct(array $options = array())
 {
     parent::__construct($options);
     try {
         $this->_cols = $this->getTable()->info('cols');
         foreach ($this->_cols as $col) {
             if (!isset($this->_data[$col])) {
                 $this->_data[$col] = null;
             }
         }
     } catch (Exception $e) {
     }
 }
Exemplo n.º 7
0
 public function __construct(array $config)
 {
     // @todo Technically, we should have this run after serialization because
     // init will get called before unserialization
     parent::__construct($config);
     // Unserialize rows
     if ($this->_table instanceof Engine_Db_Table && null !== ($cols = $this->_table->getSerializedColumns())) {
         foreach ($cols as $colName) {
             if (!empty($this->_data[$colName]) && is_scalar($this->_data[$colName]) && false != ($val = Zend_Json::decode($this->_data[$colName])) && $val != $this->_data[$colName]) {
                 $this->_data[$colName] = $val;
             }
         }
     }
 }
Exemplo n.º 8
0
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->cache = new Digitalus_Db_Cache($this);
 }
Exemplo n.º 9
0
 /**
  * Constructor
  * @param array $config array $config OPTIONAL Array of user-specified config options.
  * @param string $suffix
  * @return \Core_Db_Table_Row_Abstract
  */
 public function __construct(array $config = array(), $suffix = '_Table')
 {
     $this->_tableClass = get_class($this) . $suffix;
     parent::__construct($config);
 }
Exemplo n.º 10
0
 public function __construct(array $config)
 {
     parent::__construct($config);
     Centurion_Traits_Common::initTraits($this);
 }
Exemplo n.º 11
0
Arquivo: Row.php Projeto: dmelo/dzend
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->_enableTransform = true;
     $this->_logger = Zend_Registry::get('logger');
 }
Exemplo n.º 12
0
 /**
  * @param array $aConfig
  */
 public function __construct(array $aConfig = array())
 {
     $this->_tableClass = $this->_getTableClass();
     parent::__construct($aConfig);
 }
 public function __construct(array $config = array())
 {
     parent::__construct($config);
     $this->fetchIngredient();
     $this->fetchMeasurement();
 }
Exemplo n.º 14
0
 /**
  * Constructor
  *
  * @param  array $config OPTIONAL Array of user-specified config options.
  * @return \Core_Db_Table_Row_Abstract
  */
 public function __construct(array $config = array())
 {
     $this->_tableClass = get_class($this) . '_Table';
     parent::__construct($config);
 }