/*!
Sets the default value.
766740
function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )
    {
        if ( $currentVersion != false )
        {
            $dataText = $originalContentObjectAttribute->attribute( "data_text" );
            $contentObjectAttribute->setAttribute( "data_text", $dataText );
        }
    }
880422
public function setValue($value)
    {
        if (is_array($value)) {
            $value = implode(', ', $value);
        }

        if (!is_null($value)) {
            $this->_value = $value;
            $this->appendChild($value);
        }
    }
124501
function set_default($iid)
    {
        if ($this->ID && $iid) {
            $this->db->query(
                "UPDATE ".$this->db->table_name('identities', true).
                " SET `standard` = '0'".
                " WHERE `user_id` = ? AND `identity_id` <> ?",
                $this->ID,
                $iid);

            unset($this->identities[0]);
        }
    }
632348
protected function setValue($value)
    {
        switch ($value) {
            case self::MALE:
            case self::FEMALE:
                $this->value = $value;
                break;
            default:
                $this->value = self::UNKNOWN;
        }
    }
668768
public function setDefault($default)
    {
        $this->default = (string)$default;
        if ($this->default && !in_array($this->default, $this->values, true)) {
            $this->addValue($this->default);
        }
        return $this;
    }
1331570
public function setAsDefault()
    {
        $defCat = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("defcat");
        $oxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("oxid");
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $quotedOxId = $database->quote($oxId);
        $quotedDefCat = $database->quote($defCat);

        $queryToEmbed = $this->formQueryToEmbedForSettingCategoryAsDefault();

        // #0003650: increment all product references independent to active shop
        $query = "update oxobject2category set oxtime = oxtime + 10 where oxobjectid = {$quotedOxId} {$queryToEmbed}";
        \OxidEsales\Eshop\Core\DatabaseProvider::getInstance()->getDb()->Execute($query);

        // set main category for active shop
        $query = "update oxobject2category set oxtime = 0 where oxobjectid = {$quotedOxId} " .
              "and oxcatnid = {$quotedDefCat} {$queryToEmbed}";
        \OxidEsales\Eshop\Core\DatabaseProvider::getInstance()->getDb()->Execute($query);
        //echo "\n$sQ\n";

        // #0003366: invalidate article SEO for all shops
        \OxidEsales\Eshop\Core\Registry::getSeoEncoder()->markAsExpired($oxId, null, 1, null, "oxtype='oxarticle'");
        $this->resetContentCache();
    }
1051674
function setDefault(name,val) {
	if (typeof(window[name])=="undefined" || window[name]==null) {
		window[name]=val;
	}
}
638072
function set($key,$value=null){
        if(is_array($key)){
            self::$Config=array_merge(self::$Config,$key);
        }else{
            self::$Config[$key]=$value;
        }
    }
612166
function setValue (obj, prop, value) {
  if (value !== undefined && obj[prop] === undefined) {
    obj[prop] = value
  }
}
1228002
function setDefault (opts, key, val) {
  if (opts.schema) {
    opts.prompts = opts.schema;
    delete opts.schema;
  }
  const prompts = opts.prompts || (opts.prompts = {});
  if (!prompts[key] || typeof prompts[key] !== 'object') {
    prompts[key] = {
      'type': 'string',
      'default': val
    };
  }
  else {
    prompts[key]['default'] = val;
  }
}
767566
def set_default(self, name, value):
        
        if self.vars is None:
            self.vars = {}
        if name not in self.vars:
            self.vars[name] = value
956358
function set_data($default_values) {
        if (!is_object($default_values)) {
            // we need object for file_prepare_standard_editor
            $default_values = (object)$default_values;
        }
        $editoroptions = $this->_customdata['editoroptions'];
        $default_values = file_prepare_standard_editor($default_values, 'summary', $editoroptions,
                $editoroptions['context'], 'course', 'section', $default_values->id);
        if (strval($default_values->name) === '') {
            $default_values->name = false;
        }
        parent::set_data($default_values);
    }
1328000
public function set( $name, $value, $default )
	{
		$this->_config[$name]['value'] = $value;
		$this->_config[$name]['default'] = $default;
	}
1100282
public function setDefaultJsonDecoder()
    {
        $args = func_get_args();
        $this->jsonDecoder = function ($response) use ($args) {
            array_unshift($args, $response);

            // Call json_decode() without the $options parameter in PHP
            // versions less than 5.4.0 as the $options parameter was added in
            // PHP version 5.4.0.
            if (version_compare(PHP_VERSION, '5.4.0', '<')) {
                $args = array_slice($args, 0, 3);
            }

            $json_obj = call_user_func_array('json_decode', $args);
            if (!($json_obj === null)) {
                $response = $json_obj;
            }
            return $response;
        };
    }
821768
function setValue($values) {
        $values = (array)$values;
        foreach ($values as $name=>$value) {
            if (array_key_exists($name, $this->_values)) {
                $this->_values[$name] = $value;
            }
        }
    }
438217
def setDefault(self, key, value):
        
        if value is None:
            self._defaults.pop(key, None)
        else:
            self._defaults[key] = value
885117
public function setDefault($default)
    {
        if ($default !== null && !$this->getDataType()->doesAllowDefault()) {
            throw new LogicException(
                sprintf(
                    'Unable to set default value for the column. The data-type "%s" does not support a default.',
                    $this->getDataType()->getType()
                )
            );
        }

        if (is_array($default)) {
            foreach ($default as $k => $v) {
                $default[$k] = $this->getDataType()->cast($v);
            }
        } elseif ($default !== null) {
            if (!($this->getDataType() instanceof TimeTypeInterface)) {
                $default = $this->getDataType()->cast($default);
            }
        }

        $this->default = $default;
    }