public function __construct($config = array())
 {
     if (get_class($this) !== 'Core_Model_DbTable_Comments') {
         $this->_custom = true;
     }
     parent::__construct($config);
 }
示例#2
0
文件: Likes.php 项目: hoalangoc/ftf
 public function __construct($config = array())
 {
     if (get_class($this) !== 'Ynfeedback_Model_DbTable_Likes') {
         $this->_custom = true;
     }
     parent::__construct($config);
 }
示例#3
0
文件: Abstract.php 项目: robeendey/ce
 public function __construct($config = array())
 {
     if (!isset($this->_rowClass)) {
         $this->_rowClass = Engine_Api::_()->getItemClass($this->getItemType());
     }
     // @todo stuff
     parent::__construct($config);
 }
 public function __construct($itemType, $tableType, $config = array())
 {
     if (!is_string($itemType) || !is_string($tableType)) {
         throw new Fields_Model_Exception('Item type and table type must be strings');
     }
     $this->_fieldType = $itemType;
     $this->_fieldTableType = $tableType;
     $config['name'] = $itemType . '_fields_' . $tableType;
     parent::__construct($config);
 }
 public function __construct($config = array())
 {
     parent::__construct($config);
 }
示例#6
0
文件: Session.php 项目: robeendey/ce
 /**
  * Constructor
  *
  * $config is an instance of Zend_Config or an array of key/value pairs containing configuration options for
  * Zend_Session_SaveHandler_DbTable and Zend_Db_Table_Abstract. These are the configuration options for
  * Zend_Session_SaveHandler_DbTable:
  *
  * primaryAssignment => (string|array) Session table primary key value assignment
  *      (optional; default: 1 => sessionId) You have to assign a value to each primary key of your session table.
  *      The value of this configuration option is either a string if you have only one primary key or an array if
  *      you have multiple primary keys. The array consists of numeric keys starting at 1 and string values. There
  *      are some values which will be replaced by session information:
  *
  *      sessionId       => The id of the current session
  *      sessionName     => The name of the current session
  *      sessionSavePath => The save path of the current session
  *
  *      NOTE: One of your assignments MUST contain 'sessionId' as value!
  *
  * modifiedColumn    => (string) Session table last modification time column
  *
  * lifetimeColumn    => (string) Session table lifetime column
  *
  * dataColumn        => (string) Session table data column
  *
  * lifetime          => (integer) Session lifetime (optional; default: ini_get('session.gc_maxlifetime'))
  *
  * overrideLifetime  => (boolean) Whether or not the lifetime of an existing session should be overridden
  *      (optional; default: false)
  *
  * @param  Zend_Config|array $config      User-provided configuration
  * @return void
  * @throws Zend_Session_SaveHandler_Exception
  */
 public function __construct($config = array())
 {
     if ($config instanceof Zend_Config) {
         $config = $config->toArray();
     }
     if (is_array($config)) {
         foreach ($config as $key => $value) {
             do {
                 switch ($key) {
                     case self::PRIMARY_ASSIGNMENT:
                         $this->_primaryAssignment = $value;
                         break;
                     case self::MODIFIED_COLUMN:
                         $this->_modifiedColumn = (string) $value;
                         break;
                     case self::LIFETIME_COLUMN:
                         $this->_lifetimeColumn = (string) $value;
                         break;
                     case self::DATA_COLUMN:
                         $this->_dataColumn = (string) $value;
                         break;
                     case self::LIFETIME:
                         $this->setLifetime($value);
                         break;
                     case self::OVERRIDE_LIFETIME:
                         $this->setOverrideLifetime($value);
                         break;
                     default:
                         // unrecognized options passed to parent::__construct()
                         break 2;
                 }
                 unset($config[$key]);
             } while (false);
         }
     }
     parent::__construct($config);
 }