Get the value that should be assigned to the field.

@param  string  $name
@param  string  $value
@return string
@override
170418
public function getValueAttribute($name, $value = null)
    {
        if (is_null($name)) return $value;

        if ( ! is_null($this->old($name)))
        {
            return $this->old($name);
        }

        if ( ! is_null($value)) return $value;

        if ($this->checkIfModelExists())
        {
            return $this->getModelValueAttribute($name);
        }

        if ($this->canUpdateValueWithSessionLang())
        {
            $language_input = $this->getOldLanguageInput();
            if($this->isAValidFormAttribute($name, $language_input)) return $language_input[$name];
        }
    }
758219
public function get_value_attribute( $name, $value = null ) {
		if ( is_null( $name ) ) {
			return $value;
		}

		$old = $this->old( $name );
		if ( '_method' !== $name && ! is_null( $old ) ) {
			return $old;
		}

		$request = $this->request( $name );
		if ( '_method' !== $name && ! is_null( $request ) ) {
			return $request;
		}

		if ( ! is_null( $value ) ) {
			return $value;
		}

		if ( $this->model ) {
			return $this->get_model_value_attribute( $name );
		}

		return null;
	}
762019
public function setField($name, $value) {
    if (isset($this->fields[$name])) {
      $this->isDirty = TRUE;

      return $this->record[$name] = $value;
    }
    throw new \Exception('Not a valid Field for Set ' . $name);
  }
768186
public function getValueAttribute($name, $value = null)
    {
        if (strpos($name, '[]') !== false) {
            $name = str_replace('[]', '', $name);
        }

        if ($this->hasOldInput()) {
            return $this->getOldInput($name);
        }

        if ($this->hasModelValue($name)) {
            return $this->getModelValue($name);
        }

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

        return $this->properties[$name];
    }
1008667
public function update( string $name, $value ) {
		if ( get_field( $name, 'option') ) {
			return update_field( $name, $value, 'option');
		} elseif ( get_option( $name ) ) {
			return update_option( $name, $value );
		}
		
		return FALSE;
	}
1018519
public function set($name, $value = UNDEFINED)
    {
        if (is_array($name)) {
            foreach ($name as $key => $val) {
                $this->set($key, $val);
            }

            return $this;
        } elseif ($value === UNDEFINED) {
            throw $this->exception('You must define the second argument');
        }

        if ($this->strict_fields && !$this->hasElement($name)) {
            throw $this->exception('No such field', 'Logic')
                ->addMoreInfo('field', $name);
        }

        if (($value !== $this->data[$name]) || (is_null($value) && !array_key_exists($name, $this->data))) {
            $this->data[$name] = $value;
            $this->setDirty($name);
        }

        if ($name === $this->id_field) {
            $this->id = $value;
        }

        return $this;
    }
136065
public function container(string $name, $value=null)
  {
    # Getting or Setting the value?
    if (is_null($value)) {
      # Return what $name has stored in $container array
      $value = $this->container[$name] ?? null;

    } else {
      # Setting the container value $name to $value
      $this->container[$name] = $value;

    }

    return $value;
  }
1248054
public function set_property( $name, $value ) {
		$property = $this->get_property( $name );

		$property->setValue( $value );

		return $property;
	}
1002376
protected function getMultipleRawOptionValue($name, $value, $defaultValue)
    {
        $modelVariable = $this->getSingularVariable($this->modelName);
        $valueString = 'null';

        if (!is_null($value)) {
            $valueString = starts_with($value, '$') ? sprintf("%s", $value) : sprintf("'%s'", $value);
        }

        $defaultValueString = '[]';

        if (!empty($defaultValue)) {
            $joinedValues = implode(',', Helpers::wrapItems((array) $defaultValue));
            $defaultValueString = sprintf('[%s]', $joinedValues);
        }

        $accessor = $this->getDefaultValueAccessor($modelVariable, $name, $defaultValueString);

        return sprintf("in_array(%s, old('%s', %s) ?: [])", $valueString, $name, $accessor);
    }
1833
final public function &__get($name)
    {
        $value = $this->data[$name];

        //Apply accessor
        $this->applyModifier($name, $value, 'get');

        return $value;
    }
726106
private function tryGetOption($name, &$value) {
    if (array_key_exists($name, $this->options)) {
      $value = $this->options[$name];
      return true;
    }
    return false;
  }
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;
    }
1100484
public function getFieldValue($name)
    {
        $fieldValues = $this->toArray();
        return (isset($fieldValues[$name])) ? $fieldValues[$name] : null;
    }
557712
public function getValue(string $name): ?string
    {
        if (isset($this->data[$name])) {
            return $this->data[$name]->value;
        }
        return null;
    }
1092077
protected function _setField($name, $value)
    {
        // e.g. consumerBillingFirstname
        $this->_consumerData[self::$PREFIX . $name] = (string) $value;
    }
185520
public function set($name, $value)
    {
        $name = '_' . (string)$name;
        if (property_exists($this, $name) && (!is_array($this->$name))) {
            $this->$name = $value;
        }
        return $this;
    }