Zend_Db_Table_Abstract::setOptions PHP Method

setOptions() public method

setOptions()
public setOptions ( array $options ) : Zend_Db_Table_Abstract
$options array
return Zend_Db_Table_Abstract
    public function setOptions(array $options)
    {
        foreach ($options as $key => $value) {
            switch ($key) {
                case self::ADAPTER:
                    $this->_setAdapter($value);
                    break;
                case self::DEFINITION:
                    $this->setDefinition($value);
                    break;
                case self::DEFINITION_CONFIG_NAME:
                    $this->setDefinitionConfigName($value);
                    break;
                case self::SCHEMA:
                    $this->_schema = (string) $value;
                    break;
                case self::NAME:
                    $this->_name = (string) $value;
                    break;
                case self::PRIMARY:
                    $this->_primary = (array) $value;
                    break;
                case self::ROW_CLASS:
                    $this->setRowClass($value);
                    break;
                case self::ROWSET_CLASS:
                    $this->setRowsetClass($value);
                    break;
                case self::REFERENCE_MAP:
                    $this->setReferences($value);
                    break;
                case self::DEPENDENT_TABLES:
                    $this->setDependentTables($value);
                    break;
                case self::METADATA_CACHE:
                    $this->_setMetadataCache($value);
                    break;
                case self::METADATA_CACHE_IN_CLASS:
                    $this->setMetadataCacheInClass($value);
                    break;
                case self::SEQUENCE:
                    $this->_setSequence($value);
                    break;
                default:
                    // ignore unrecognized configuration directive
                    break;
            }
        }
        return $this;
    }

Usage Example

Example #1
0
 /**
  * @param array $options
  * @return ZFExt_Db_Table
  */
 public function setOptions(array $options)
 {
     if (isset($options[self::CACHE])) {
         $this->setCache($options[self::CACHE]);
     }
     return parent::setOptions($options);
 }
All Usage Examples Of Zend_Db_Table_Abstract::setOptions