Get the value that should be assigned to the field.

@param  string  $name
@param  string  $value

@return string
435505
public function getValueAttribute($name, $value = null)
    {
        if (is_null($name)) {
            return $value;
        }

        if (! is_null($value)) {
            return $value;
        }
    }
625462
public function bit($name,$value)
  {
    $name = $this->get_field_name($name);
    $this->_operations['$bit'][$name] = $value;
    return $this->_set_dirty($name);
  }
158777
public function assign(string $name, $value): object
    {
        $this->data[$name] = $value;
        return $this;
    }
551889
public function holder($name = null, $value = null) {
        if ($name === null && $value === null) {
            return $this->holders[ 'default' ];
        }
        if ($value === null) {
            $value = $name;
            $name = 'default';
        }
        $this->holders[ $name ] = $value;
        return null;
    }
166323
protected function old($name, $value = null)
    {
        if (empty($name)) {
            return;
        }

        // Convert array format (sth[1]) to dot notation (sth.1)
        $name = preg_replace('/\[(.+)\]/U', '.$1', $name);

        // If there's no default value provided, the html builder currently
        // has a model assigned and there aren't old input items,
        // try to retrieve a value from the model.
        if (empty($value) && $this->model && empty($this->request->old())) {
            $value = data_get($this->model, $name) ?? '';
        }

        return $this->request->old($name, $value);
    }
520021
public function getField( $name )
	{
		if( !$this->hasField( $name ) )
			return NULL;
		$values	= $this->getFieldsByName( $name );
		return array_shift( $values );
	}
1103137
public function header($name, $value = null)
    {
        if (!is_null($value)) {
            $this->headers->set($name, $value);
        }

        return $this->headers->get($name);
    }
108239
protected function renderInlineAssignment($name, $value)
    {
        if ($value instanceof RawText) {
            $value = $value->getText();
        } else {
            $value = $this->escape($value);
        }

        return $this->escape($name).'='.$value;
    }
1064259
public function assign($name, $value = null)
    {
        if (is_string($name)) {
            return $this->data[$name] = $value;
        }

        if (is_array($name)) {
            return $this->assignFromArray($name);
        }

        throw new \InvalidArgumentException("Invalid data type for key, '" .gettype($name) . "' given.");
    }
334004
public function get($value, $field = '*', $name = 'id')
    {
        $map = array(
            $name => $value
        );
        return $this->where($map)
            ->field($field)
            ->find();
    }
744868
public function input(string $name, $value = null)
    {
        if ($value !== null) {
            !$this->all && $this->inputs();

            Arrays::set($this->input, $name, $value);
            $this->cache = [];

            return $value;
        }

        if (isset($this->input[$name])) {
            return $this->input[$name];
        }

        if (\array_key_exists($name, $this->cache)) {
            return $this->cache[$name];
        }

        if ($this->all) {
            $found = Arrays::get($this->input, $name);
        } else {
            if ($this->serverRequest->getMethod() !== 'GET') {
                $found = $this->request($name);
            }

            $found = $found ?? $this->query($name);
        }

        return $this->cache[$name] = $found;
    }
1368628
public function getFieldValue($name)
    {
        $result = null;
        foreach ($this->fields as $key => $fields) {
            if (isset($fields[$name])) {
                $result = $this->fields[$key][$name]->getValue();
            }
        }
        return $result;
    }
718037
public function getValue($name)
    {
        $value = null;
        if ($this->has($name)) {
            $value = call_user_func_array(
                [$this->_inputs[$name], 'getValue'],
                [$name]
            );
        }
        return $value;
    }
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));
    }
908830
public function getField($name)
    {
        return (null !== $name && array_key_exists($name, $this->fields)) ? $this->fields[$name] : null;
    }
1361475
public function getValue($name)
	{
		if (! isset($this->values[$name]))
		{
			$this->values[$name] = arg($name);
		}

		return $this->values[$name];
	}
251886
public function datetime($name = null, $value = null) 
	{
		Argument::i()
			->test(1, 'string', 'null')
			->test(2, 'scalar', 'null');
			
		$field = Datetime::i();
		
		if(!is_null($name)) {
			$field->setName($name);
		}
		
		if(!is_null($value)) {
			$field->setValue($value);
		}
		
		return $field;
	}