Sets data

@param *array|string $data  The array data to set
@param mixed         $value If data is a key then this is the value

@return Eden\Session\Index
977027
public function set($data, $value = null)
    {
        //argument 1 must be a string or array
        Argument::i()->test(1, 'array', 'string');

        if (!self::$session) {
            Exception::i()->setMessage(self::ERROR_NOT_STARTED)->trigger();
        }

        if (is_array($data)) {
            $_SESSION = $data;
            return $this;
        }

        $_SESSION[$data] = $value;

        return $this;
    }
159720
function set($key, $value)
    {
        $index = array_search($key, $this->keys);

        if ($index !== false) {
            $this->values[$index] = $value;
        } else {
            $this->keys[] = $key;
            $this->values[] = $value;
        }
    }
1031573
public function set($key, $value=null)
    {
        if (is_array($key)) {
            $this->data = array_merge($this->data, $key);
        } elseif ($key instanceof Collection) {
            $this->set($key->all());
        } elseif (is_scalar($key)) {
            $this->data[$key] = $value;
        }
        
        return $this;
    }
973837
public function set($key, $value)
    {
        $keys = explode('.', $key);

        $data = $this->getAll();

        $resource = &$data;
        foreach ($keys as $key) {
            if (!isset($resource[$key]) || !is_array($resource[$key])) {
                $resource[$key] = [];
            }
            $resource = &$resource[$key];
        }
        $resource = $value;

        $this->setAll($data);

        return $this;
    }
19913
public function set($key, $value)
    {
        $keys = explode('.', $key);

        $data = &$this->parameters;

        while (count($keys) > 1) {
            $pkey = $keys[0];

            if (!array_key_exists($pkey, $data) || !is_array($data[$pkey])) {
                $data[$pkey] = [];
            }

            $data = &$data[$pkey];
            array_shift($keys);
        }

        $data[$keys[0]] = $value;

        return $this;
    }
738121
public function setValue(?string $value) : Setting
    {

        if ($this->data['value'] !== $value) {
            $this->data['value'] = $value;
            $this->setModified('value');
        }

        return $this;
    }
911864
public function data($key, $value=null) :self {
		// if we have an array of data
		if(is_array($key)) {
			// for each of those
			foreach($key as $index => $value) {
				// set them
				$this->data($index, $value);
			}
		}
		else {
			// set a value
			$this->data[$key] = $value;
		}
		// return self
		return $this;
	}
234697
public function setValue($value, $data = null)
    {
        if ($data instanceof DataObject) {
            $this->loadFrom($data);
            return $this;
        }
        
        return parent::setValue($value);
    }
698147
public function set($key, $value = null)
    {
        $data = is_array($key) ? $key : [$key => $value];
        $obj = self::instance();
        $obj->fill($data);
        return $obj->save();
    }
551577
public function setValue($value, $data = null)
    {
        // Define Value Property:
        
        $this->value = $value;
        
        // Determine Value Type:
        
        if (is_array($value)) {
            
            // Define from Array:
            
            foreach ($this->fields as $dim => $field) {
                
                if (isset($value[$dim])) {
                    $field->setValue($value[$dim]);
                }
                
            }
            
        } elseif ($value instanceof DBDimensions) {
            
            // Define from Field:
            
            foreach ($this->fields as $dim => $field) {
                $field->setValue($value->{$dim});
            }
            
        }
        
        // Answer Receiver:
        
        return $this;
    }
289278
public function setValue($value) {
		Argument::i()->test(1, 'scalar', 'array', 'null');
		
		if(!is_array($value)) {
			$value = func_get_args();
		}
		
		$this->value = $value;
			
		return $this;
	}
1036680
public function setData(array $data)
    {
        foreach ($data as $key => $val) {
            $setter = $this->setter($key);
            if (is_callable([ $this, $setter ])) {
                $this->{$setter}($val);
            } else {
                $this->{$key} = $val;
            }
        }

        return $this;
    }
780336
public function set($key, $value) {
        if (is_array($key)) {
            $this->data = array_merge($this->data, $key);
        } else {
            $this->data[ $key ] = $value;
        }
        return $this;
    }
499089
public static function setUserdata($data = '', $value = NULL)
    {
        if (is_array($data)) {
            foreach ($data as $key => &$value) {
                $_SESSION[$key] = $value;
            }

            return;
        }

        $_SESSION[$data] = $value;
    }
922440
public function set($name, $value = null)
    {
        if (!is_array($name)) {
            $this->data[$name] = $value;
        } else {
            foreach ($name as $key => $value) {
                $this->data[$key] = $value;
            }
        }
        return $this;
    }
1277518
public static function set($data, $keys, $value)
    {
        return self::instance()->setValue($data, $keys, $value);
    }
270561
public function set($key, $value)
    {
        if (method_exists($this, 'validate' . ucfirst($key))) {
            $value = call_user_func([$this, 'validate' . ucfirst($key)], $value);
        }

        $this->checkKeyExistInDefault($key);

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

        return $this;
    }