Set/modify the property with the specified key.

@param  string $key
@param  mixed  $value
347872
protected function setProperty($key, $value) {
        // convert string representations of special values
        if (is_string($value)) {
            switch (strtolower($value)) {
                case  'null' :
                case '(null)':
                    $value = null;
                    break;

                case  'true' :
                case '(true)':
                case  'on'   :
                case  'yes'  :
                    $value = true;
                    break;

                case  'false' :
                case '(false)':
                case  'off'   :
                case  'no'    :
                    $value = false;
                    break;

                default:
                    if (strIsQuoted($value)) {
                        $value = substr($value, 1, strlen($value)-2);
                    }
            }
        }

        // set the property depending on the existing data structure
        $properties  = &$this->properties;
        $subkeys     =  $this->parseSubkeys(strtolower($key));
        $subkeysSize =  sizeof($subkeys);

        for ($i=0; $i < $subkeysSize; ++$i) {
            $subkey = trim($subkeys[$i]);
            if (!strlen($subkey)) throw new InvalidArgumentException('Invalid argument $key: '.$key);

            if ($i+1 < $subkeysSize) {
                // not yet the last subkey
                if (!key_exists($subkey, $properties)) {
                    $properties[$subkey] = [];                              // create another array level
                }
                elseif (!is_array($properties[$subkey])) {
                    $properties[$subkey] = ['' => $properties[$subkey]];    // create another array level and keep the
                }                                                           // existing non-array value
                $properties = &$properties[$subkey];                        // reference the new array level
            }
            else {
                // the last subkey: check for bracket notation
                if (preg_match('/(.+)\b *\[ *\]$/', $subkey, $match)) {
                    // bracket notation
                    $subkey = $match[1];
                    if (!key_exists($subkey, $properties)) {
                        $properties[$subkey] = [$value];                    // create a new array value
                    }
                    else {
                        if (!is_array($properties[$subkey]))                // make the existing value the array root value
                            $properties[$subkey] = ['' => $properties[$subkey]];
                        $properties[$subkey][] = $value;                    // add an array value
                    }
                }
                else {
                    // regular non-bracket notation
                    if (!key_exists($subkey, $properties)) {
                        $properties[$subkey] = $value;                      // store the value regularily
                    }
                    else if (!is_array($properties[$subkey])) {
                        $properties[$subkey] = $value;                      // override the existing value
                    }

                    // modification of an array value
                    else if ($value === null) {
                        $properties[$subkey] = $value;                      // set the array to NULL, don't remove the key
                    }
                    else if (is_array($value)) {
                        $properties[$subkey] = $value;                      // replace the array
                    }
                    else {
                        $properties[$subkey][''] = $value;                  // set/override the array root value
                    }
                }
            }
        }

        // TODO: update the cache if the instance is a cached instance
    }
707265
public function set($key, $value)
    {
        $config = &$this->config;

        foreach (explode('.', $key) as $k) {
            $config = &$config[$k];
        }

        $config = $value;

        return true;
    }
851871
public function offsetSet($key, $value)
    {
        $key = strtr(strtolower($key), '_', '-');

        $this->_data[$key] = $value;
    }
1147970
public function setProperty($key, $value)
    {
        if(null === $this->properties)
        {
            $this->properties = array();
        }
        $key   = (string) $key;
        $value = (string) $value;

        $this->properties[$key] = $value;

        if((substr($key, 0, 5) == 'tree_') && $this->hasChildren())
        {
            foreach($this->children as $child)
            {
                if(!$child->hasProperty($key))
                {
                    $child->setProperty($key, $value);
                }
            }
        }
    }
1033766
public function set($key, $value)
    {
        if ($this->ttl === null) {
            $this->client->set($key, $this->serializer->serialize($value));
        } else {
            $this->client->set($key, $this->serializer->serialize($value), 'ex', $this->ttl);
        }
    }
198522
public function setByKey($key, $value)
    {
        $storage = $this->getStorage();
        if ($value !== '' && $value !== null) {
            $storage[$key] = $value;
        } else {
            unset($storage[$key]);
        }
        $this->setStorage($storage);
    }
306001
public function set($key, $value = null)
    {
        if (is_array($key)) {
            $key = $this->flattenArray($key);
            $this->settings = array_merge($this->settings, $key);
        } else {
            $this->settings[$key] = $value;
        }
    }
349079
public function offsetSet($key = null, $value = null)
    {
        if(is_null($key))
            $this->attributes[] =   $value;
        else
            $this->attributes[$key] =   $value;
    }
429846
public function set($key, $value = null)
    {
        if( is_array($key) ) {
            $this->values($key);
        } else {
            $this->value($key, $value);
        }
        return $this;
    }
525308
public function offsetSet($key, $value) {
        if(!$this->offsetExists($key)) {
            $this->table[$key] = new Value($value);
        } else {
            $this->table[$key]->setValue($value);
        }
    }
88877
public function set(string $key, $value)
    {
        if (!is_array($value)) {
            $value = [$value];
        }
        $this->data[$key] = $value;
    }
599155
public function set(string $key, $value)
    {
        if (!isset($this->data[$this->activeAssetSourceIdentifier])) {
            $this->initializeData($this->activeAssetSourceIdentifier);
        }
        $this->data[$this->activeAssetSourceIdentifier][$key] = $value;
    }
138877
public function setProperty($key, $value)
    {
        $oldValue = null;
        if (isset($this->properties[$key])) {
            $oldValue = $this->properties[$key];
        }
        $this->properties[$key] = $value;

        return $oldValue;
    }
1076180
public function setParams( $key, $value = '' ) {
		//if (!isset($this->params)) $this->params = array();

		if ( is_array( $key ) ) {
			self::$RealParams = $key;
		} else {
			self::$RealParams[ $key ] = $value;
		}

	}
1029495
public function set($key, $value = null)
    {
        if ($value === null) {
            $this->parameters = $key + $this->parameters;
        } else {
            $this->parameters[$key] = $value;
        }

        return $this;
    }
1357525
public function set($key, $value) {
		if (null === $key) {
			$this->_data[] = $value;
		} else {
			$this->_data[$key] = $value;
		}
	}
888346
public function offsetSet($key, $value)
    {
        if ($key === null) {
            $this->items[] = $this->referenceEntityFactory($value);
        } else {
            $this->items[$key] = $this->referenceEntityFactory($value);
        }
    }