data

@param string $name
@param mixed  $value

@return  string|static

@since  3.5.3
326442
public function data(string $name, $value = null)
    {
        if ($value === null) {
            return $this->getAttribute('data-' . $name);
        }

        return $this->setAttribute('data-' . $name, $value);
    }
516402
public B data(String name, String value) {
        get().dataset.set(name.replaceFirst("^data-", ""), value);
        return that();
    }
311898
public function parameter(string $name, $value): HttpRequest
    {
        $this->parameters[$name] = $value;

        return $this;
    }
304881
protected function loadData(string $name)
	{
		if (isset($this->data[$name])) return $this->data[$name];
		else return null;
	}
355307
public static function get( $name = '', $value = '' ) {

		if ( ! empty( $value ) ) {
			$_GET[ $name ] = $value;
		}

		if ( empty( $name ) ) {
			return $_GET;
		} else {
			return ( isset( $_GET[ $name ] ) ) ? $_GET[ $name ] : NULL;
		}

	}
268558
protected function getValueArray($name, $value = null)
    {
        // Looks for the values in "old"
        if (!$this->oldInputIsEmpty()) {
            if (is_null($this->session->getOldInput($name))) { // we have old input, but none for this name
                return [];
            } else {
                return $this->session->getOldInput($name);
            }
        }
        // Looks for the values in the Request
        if (isset($this->request) and $this->request->input($name)) {
            return $this->request->input($name);
        }
        // Returns the default value
        return empty($value) ? [] : $value;
    }
251667
public function meta(string $name, $value = null)
    {
        if ($value === null) {
            return $this->getMeta($name);
        }

        $this->setMeta($name, $value);
    }
400301
public function getData($name=NULL) {
		$data = NULL;

		if(isset($this->response_result['data'])) {
			$data = $this->response_result['data'];
		}else {
			return NULL;
		}

		if(isset($name)) {
			if(isset($data[$name])) {
				return $data[$name];
			}
		} else {
			return $data;
		}
	}
883564
final protected function setAttribute($name, $value)
    {
        if ($value !== null && $this->hasAttributeValueFactory($name)) {
            $this->internalCache[$name] = $this->createAttributeValue($name, $value);

            if ($this->internalCache[$name] instanceof JsonSerializable) {
                $value = $this->internalCache[$name]->jsonSerialize();
            } elseif (is_array($this->internalCache[$name])) {
                $value = array_map(
                    function ($value) {
                        if ($value instanceof JsonSerializable) {
                            $value = $value->jsonSerialize();
                        }

                        return $value;
                    },
                    $this->internalCache[$name]
                );
            } else {
                $value = $this->internalCache[$name];
            }
        }

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

        return $this;
    }
941542
public static function get($name, $value = NULL)
    {
        return isset($_GET[$name]) ? $_GET[$name] : $value;
    }
698806
public function setAttribute($name, $value) {
		if(!isset($this->payload['params']['Data'])) {
			$this->payload['params']['Data'] = array();
		}

		if(!isset($this->payload['params']['Data']['Attributes'])) {
			$this->payload['params']['Data']['Attributes'] = array();
		}
		$this->payload['params']['Data']['Attributes'][$name] = Trustly_Data::ensureUTF8($value);
		return $value;
	}
570464
public function set($name, $value=null)
    {   
        if ($name instanceof Query) {
            parent::set($name);
            return $this;
        } elseif (is_array($name)) {
            foreach ($name as $k => $v) {
                $this->set($k, $v);
            }
            return $this;
        } elseif (is_numeric($name)) {
            $this->set('where', $name);
            return $this;
        }
        
        if (!empty($value)) {
            if ($name == 'type') {
                $this->type($value);
            } elseif (in_array($name, array('distinct', 'group', 'having', 'order', 'limit', 'page', 'pagesize', 'start', 'result_key'))) {
                $this->data[$name] = is_array($value) ? $value : array($value);
            } elseif (in_array($name, ['set', 'values', 'data'])) { // data
                if (!isset($this->data[$name])) $this->data[$name] = [];
                
                if (is_array($value) && isset($value[0])) {
                    $this->data[$name] += $value;
                } else {
                    $this->data[$name][] = $value;
                }
            } elseif ($name == 'join' || $name == 'leftjoin') {
                $name = 'join';
                if (!isset($this->data[$name])) $this->data[$name] = [];
                if (is_array($value) && isset($value[0])) {
                    if (is_array($value[0]) || (isset($value[1]) && is_string($value[1]) && preg_match('/\s+as\s+/', $value[1])) ) {
                        $this->data[$name] += $value;
                    } else {
                        $this->data[$name][] = $value;
                    }
                } else {
                    $this->data[$name][] = $value;
                }
            } else {
                if ($name == 'select') { // select == fields
                    $this->type($name);
                    $name = 'fields';
                } elseif (in_array($name, ['insert', 'update', 'delete'])) { // table
                    $this->type($name);
                    $name = 'table';
                } elseif (in_array($name, ['table', 'from'])) {
                    $name = 'table';
                } elseif ($name == 'count') {
                    $this->data['count'] = 1;
                    $name = 'fields';
                    if (strpos($value, 'count') === false) $value = 'count(' . $value . ')';
                } 
                
                if (is_array($value)) {
                    $this->data[$name] = isset($this->data[$name]) ? array_merge($this->data[$name], $value) : $value;
                } else {
                    $this->data[$name][] = $value;
                }
            }
        } elseif (in_array($name, ['select', 'insert', 'update', 'delete'])) {
            $this->type($name);
        } elseif ($name == 'count') {
            $this->data['count'] = 1;
        }
        
        return $this;
    }
1253091
private static function getHtmlAttribute(string $name, $value): string
    {
        if (!self::isset($value)) {
            return '';
        }

        if ($value === true) {
            return $name;
        }

        if (is_array($value)) {
            $value = self::convertAttributeArrayValue($name, $value);
        }

        return sprintf('%s="%s"', $name, static::escape((string) $value));
    }
865467
public static function server(String $name = '', $value = NULL)
    {
        // @value parametresi boş değilse
        if( ! empty($value) )
        {
            $_SERVER[$name] = $value;
        }

        return Server::data($name);
    }
1039112
public function getProperty($name, $value = null)
    {
        if (!isset($this->properties[$name])) {
            $this->properties[$name] = new VariableProperty($this, $name, $value);
        }

        return $this->properties[$name];
    }
1195342
public function setData($name, $value) {
		if(!isset($this->payload['result'])) {
			$this->payload['result'] = array();
		}
		if(!isset($this->payload['result']['data'])) {
			$this->payload['result']['data'] = array($name => $value);
		} else {
			$this->payload['result']['data'][$name] = $value;
		}
		return $value;
	}
691825
public function type($name, $value)
    {
        $schema = Config::table($this->name)->schema();
        if (array_key_exists($name, $schema) && (null === $value || $schema[$name] == gettype($value)))
        {
            return TRUE;
        }

        throw new LazerException('Wrong data type');
    }