Sets a Constant.
@access		public
@static
@param		string		$key		Name of Constant to set
@param		mixed		$value		Value of Constant to set
@param		bool		$strict		Flag: set only if unset
@return		bool
@throws		RuntimeException		if Constant has already been set
504379
public static function set( $key, $value, $strict = TRUE )
	{
		$key	= strtoupper( $key );
		if( defined( $key ) && $strict )
			throw new RuntimeException( 'Constant "'.$key.'" is already defined.' );
		return define( $key, $value );
	}
377880
function keysOf ($value, $strict = true)
  {
    $this->A = array_keys ($this->A, $value, $strict);
    return $this;
  }
1074055
public function setIn($keys, $value)
    {
        $lastKey = array_shift($keys);
        if (count($keys) > 0 && !isset($this->$lastKey->{$keys[0]})) {
            throw new \RuntimeException(sprintf("Key '%s->%s' does not exist.", $lastKey, $keys[0]));
        }
        if (count($keys) > 0 && $this->$lastKey instanceof Map) {
            return $this->merge(new self(array($lastKey => $this->$lastKey->setIn($keys, $value))));
        }
        return $this->merge(new self(array($lastKey => $value)));
    }
52878
static public function set($key, $value) {
        $config = &self::$_config;
        
        Utils::arraySet($config, $key, $value);
    }
904092
public static function validate($value, $strict = true)
    {
        if (static::isValidValue($value, $strict) === false) {
            throw new InvalidEnumValueException(static::getConstants());
        }
        return $value;
    }
1016286
public function set($key, $value)
    {
        $this->load();
        $oldValue = isset($this->values[$key]) ? $this->values[$key] : null;
        $this->values[$key] = $value;
        return $oldValue;
    }
1009401
public function set($key, $value)
    {
        $cont = clone $this;
        $cont->doSet($key, $this->recursiveClone($value));

        return $cont;
    }
24681
public function set($key, $value)
    {
        if (is_bool($value)) {
            $value = $value ? 'true' : 'false';
        }

        return parent::set($key, $value);
    }
1372982
public function set($key, $value, $seconds, $strict = true) {
        $this->storage[$key] = $value;
    }
1373323
public function set($key, $value) {
        if (!is_string($key)) throw new IllegalTypeException('Illegal type of parameter $key: '.gettype($key));
        $this->setProperty($key, $value);
        return $this;
    }
704214
public function setData( $key, $value = NULL, $strict = TRUE ){
		if( empty( $key ) )																			//  no valid data key defined
			throw new InvalidArgumentException( 'Data key is required' );							//  throw exception
		if( array_key_exists( $key, $this->data ) && $strict )										//  data key already has a value
			throw new RuntimeException( 'Data attribute "'.$key.'" is already set' );				//  throw exception
		if( !preg_match( '/^[a-z0-9:_-]+$/i', $key ) )												//  key is invalid
			throw new InvalidArgumentException( 'Invalid data key "'.$key.'"' );					//  throw exception

		if( $value === NULL || $value === FALSE ){													//  no value available
			if( array_key_exists( $key, $this->data ) )												//  data exists
				unset( $this->data[$key] );															//  remove attribute
		}
		else
		{
			if( is_string( $value ) || is_numeric( $value ) )										//  value is string or numeric
				if( preg_match( '/[^\\\]"/', $value ) )												//  detect injection
					throw new InvalidArgumentException( 'Invalid data attribute value' );			//  throw exception
			$this->attributes[$key]	= $value;														//  set attribute
		}
	}
1252193
public function set($key, $value = null)
    {
        if ($value === null) {
            $this->defaultValues = $key + $this->defaultValues;
        } else {
            $this->defaultValues[$key] = $value;
        }

        return $this;
    }
528147
public function is($value, bool $strict = false): bool
    {
        if ($this === $value) {
            return true;
        }

        if ($strict && (!is_object($value) || get_class($this) !== get_class($value))) {
            return false;
        }

        if ($value instanceof self) {
            $value = $value->value();
        }

        return $this->value() == $value;
    }
1233146
public function set( $key, $value ) {
		$this->reload_options();
		$suspend_reload         = $this->_suspend_reload;
		$prev                   = isset( $this->_options[ $key ] ) ? $this->_options[ $key ] : null;
		$this->_options[ $key ] = $value;
		if ( $prev !== $value ) {
			$this->_suspend_reload = true;
			$this->do_action( 'changed_option', $key, $value, $prev );
			$this->_suspend_reload = $suspend_reload;
		}

		return $this->save();
	}
412237
public function set($key, $value = null)
    {
        if (isset($value)) {
            $this->building[$key] = $value;
            return $this;
        }

        return new static($this->getSetCallback($key));
    }
573012
public function setnx(string $key, $value): bool {
		if ($value instanceof Closure) {
			$value = $value();
		}
		return $this->driver->setnx($key, static::serialize($value));
	}
819237
public function search($value, $strict = false)
    {
        if (! $this->useAsCallable($value)) {
            return array_search($value, $this->items, $strict);
        }

        foreach ($this->items as $key => $item) {
            if (call_user_func($value, $item, $key)) {
                return $key;
            }
        }

        return false;
    }