Get value

If no "value" value has been set, this method will
set and return a default "value" value,
if any such value is available

@see getDefaultValue()

@return string|null value or null if no value has been set
767850
public function getValue() : ?string 
    {
        if ( ! $this->hasValue()) {
            $this->setValue($this->getDefaultValue());
        }
        return $this->value;
    }
783186
public function getDefaultValue()
    {
        if ($this->isDefaultValueAvailable()) {
            $prettyPrinter = new PrettyPrinter\Standard;
            return $prettyPrinter->prettyPrintExpr($this->node->default);
        }
        throw new ModelException(
            sprintf(
                'Parameter #%d [$%s] is not optional.',
                $this->getPosition(),
                $this->getName()
            )
        );
    }
865272
public function getValue()
    {
        if (!empty($this->node->props[0]->default->value)) {
            return $this->node->props[0]->default->value;
        }
        return;
    }
1232059
public function value()
    {
        $escape = isset($this->default["escape-values"])
            ? $this->default["escape-values"]
            : true;

        return $escape
            ? $this->getEscapedValue()
            : $this->getRawValue();
    }
978275
public function getDefaultOwnerAttributeValue()
    {
        if (Yii::$app->has('user')) {
            $userId = Yii::$app->get('user')->id;
            if ($userId === null) { // something wrong
                throw new InvalidValueException('Empty owner ID');
            }
            return $userId;
        }
    }
1298825
public function getDefault() {
        // timestamp default
        if ($this->default === Schema::DF_CURRENT_TIMESTAMP) {
            // check for right datatpye
            $stamp_type = $this->findQuery($this->schema->dataTypes['TIMESTAMP']);
            if ($this->type != 'TIMESTAMP' &&
                ($this->passThrough && strtoupper($this->type) != strtoupper($stamp_type))
            )
                trigger_error(self::TEXT_CurrentStampDataType,E_USER_ERROR);
            return $this->findQuery($this->schema->defaultTypes[strtoupper($this->default)]);
        } else {
            // static defaults
            $type_val = $this->getTypeVal();
            $pdo_type = preg_match('/int|bool/i', $type_val, $parts) ?
                constant('\PDO::PARAM_'.strtoupper($parts[0])) : \PDO::PARAM_STR;
            return ($this->default === NULL ? 'NULL' :
                $this->db->quote(htmlspecialchars($this->default, ENT_QUOTES,
                    \Base::instance()->get('ENCODING')), $pdo_type));
        }
    }
396647
public function getValue()
    {
        $from_input = $this
            ->grid
            ->getInputProcessor()
            ->getFilterValue($this->config->getId());
        if ($from_input === null) {
            return $this->config->getDefaultValue();
        } else {
            return $from_input;
        }
    }
107989
protected function getValue($name, $default = null)
    {
        if (array_key_exists($name, $this->data)) {
            return $this->data[$name];
        }

        return $default;
    }
309522
public function getDefaultValues()
    {
        preg_match('/([0-9.]+)([A-Z]{3})/', $this->config['price'], $matches);

        $this->defaults['price'] = array(
            'currency' => (!empty($this->defaults['price']['currency']) ? $this->defaults['price']['currency'] : $matches[2]),
            'amount' => (!empty($this->defaults['price']['amount']) ? $this->defaults['price']['amount'] : $matches[1]),
            'vat' => (!empty($this->defaults['price']['vat']) ? $this->defaults['price']['vat'] : null),
        );

        return $this->defaults;
    }
1133242
public function getDefaultValue(string $variableName)
    {
        if (isset($this->defaultValues[$variableName])) {
            return $this->defaultValues[$variableName];
        }

        return null;
    }
349750
public function getDefault() {
		if( is_object($this->default) ) {
			$this->default = call_user_func_array($this->default->type, (array) $this->default->args);
		} else
		if( defined($this->default) ) {
			return constant($this->default);
		}
		return $this->default;
	}
1063379
function $$getDefaultValue() {
      if (!injector) throw new Error("Injectable functions cannot be called at configuration time");
      var defaultValue = injector.invoke(config.$$fn);
      if (defaultValue !== null && defaultValue !== undefined && !self.type.is(defaultValue))
        throw new Error("Default value (" + defaultValue + ") for parameter '" + self.id + "' is not an instance of Type (" + self.type.name + ")");
      return defaultValue;
    }
930746
public function defaultValue()
    {
        if ($this->default === null) {
            return null;
        }

        $default = $this->default;

        if (strstr($this->default, '{{') && strstr($this->default, '}}')) {
            // Parse special replacements (if we have one)
            $default = str_replace("{{CURRENT_TIME}}", date('c', time()), $default);
        }

        return $default;
    }
899082
public function getFieldsDefaultValue() {
		$cachePath = 'local_fields_default_val';
		$cached = Cache::read($cachePath, CAKE_LDAP_CACHE_KEY_LDAP_SYNC_DB);
		if ($cached !== false) {
			return $cached;
		}

		$result = [];
		$fieldsInfo = $this->_modelConfigSync->getLocalFieldsInfo();
		$fieldsInfo += $this->_modelConfigSync->getLdapFieldsInfo();
		if (empty($fieldsInfo)) {
			return $result;
		}

		$schema = $this->schema();
		foreach ($fieldsInfo as $fieldName => $fieldInfo) {
			if (!isset($schema[$fieldName])) {
				continue;
			}

			$defaultValue = null;
			if (isset($fieldInfo['default'])) {
				$defaultValue = $fieldInfo['default'];
			}

			$result[$fieldName] = $defaultValue;
		}

		Cache::write($cachePath, $result, CAKE_LDAP_CACHE_KEY_LDAP_SYNC_DB);

		return $result;
	}
832486
public function getValue()
    {
        if ( ! $this->isSet() and isset($this->default))
        {
            $this->setValue($this->default, true);
        }

        return $this->value;
    }
47734
public function getPhpDefaultValue()
    {
        if ($this->defaultValue === null) {
            return null;
        }

        if ($this->defaultValue->isExpression()) {
            throw new EngineException("Cannot get PHP version of default value for default value EXPRESSION.");
        }

        if ($this->propelType === PropelTypes::BOOLEAN || $this->propelType === PropelTypes::BOOLEAN_EMU) {
            return $this->booleanValue($this->defaultValue->getValue());
        }

        if (PropelTypes::PHP_ARRAY === $this->propelType) {
            return $this->getDefaultValueForArray($this->defaultValue->getValue());
        }

        return $this->defaultValue->getValue();
    }
436443
public function getValueByPathOrDefaultValue($path, $defaultValue)
    {
        $value = $this->getValueByPath($path);
        if (is_null($value)) {
            return $defaultValue;
        }

        return $value;
    }