Resolves the actual value of any given value that is about to be processed.
@param mixed $value The value to resolve
@return mixed The resolved value
484806
protected function resolveValue($value)
    {
        do {
            if ($value instanceof \JsonSerializable) {
                $value = $value->jsonSerialize();
            } elseif ($value instanceof \Closure) {
                $value = $value();
            } else {
                break;
            }
        } while (true);

        return $value;
    }
50437
private function valueRetriever($value)
    {
        if ($this->useAsCallable($value)) {
            return $value;
        }

        return function ($item) use ($value) {
            if ($value === null) {
                return $item;
            }

            $item = (array)$item;
            return isset($item[$value]) ? $item[$value] : null;
        };
    }
1144948
public function asValue($value)
    {
        $endPoint = &$this->getEndPoint();
        $endPoint['lookupType'] = self::TYPE_VALUE;
        $endPoint['value'] = $value;

        return $this;
    }
814747
public function resolveLinks($value)
    {
        if (is_array($value)) {
            return array_map([$this, 'resolveLinks'], $value);
        }

        if (is_string($value) && strpos($value, '{@') !== false) {
            $value = $this->resolveLinksInString($value);
        }

        return $value;
    }
149974
private function resolveValue(ContainerInterface $container, $value)
    {
        if (is_array($value)) {
            foreach ($value as $key => $val) {
                $value[$key] = $this->resolveValue($container, $val);
            }

            return $value;
        }

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

        $escapedValue = preg_replace_callback('/%%|%([^%\s]++)%/', function ($match) use ($container, $value) {
            // skip %%
            if (!isset($match[1])) {
                return '%%';
            }

            $resolved = $container->getParameter($match[1]);
            if (is_string($resolved) || is_numeric($resolved)) {
                return (string) $resolved;
            }

            throw new \RuntimeException(sprintf(
                    'The container parameter "%s" must be a string or numeric, but it is of type %s.',
                    $match[1],
                    gettype($resolved)
                )
            );
        }, $value);

        return str_replace('%%', '%', $escapedValue);
    }
1008520
protected function resolveQueueableEntity($value)
	{
		if (is_string($value) && starts_with($value, '::entity::'))
		{
			list($marker, $type, $id) = explode('|', $value, 3);

			return $this->getEntityResolver()->resolve($type, $id);
		}

		return $value;
	}
309486
public function resolve($value, $default = 'value')
    {
        $callable = $this->getCallable($value);

        if (is_array($callable)) {
            if (is_callable($callable[0])) {
                return call_user_func_array($callable[0], $callable[1]);
            } else {
                return $callable[0];
            }
        }

        return $this->fallback->resolve($value, $default);
    }
913981
public static function getValue($value)
    {
        if (is_string($value)) {
            return static::escapeText($value);
        }
        if (is_bool($value)) {
            return static::getBoolean($value);
        }
        if (is_array($value)) {
            return static::getArray($value);
        }
        return $value;
    }
1362359
public static function getReal($value)
    {
        $value     = (float)$value;
        $stringVal = (string)$value;
        if (!fmod($value, 1)) {
            $stringVal .= ".";
        }
        return $stringVal;
    }
1139999
public function getTransformedValue($value)
    {
        if(is_scalar($value) || (is_object($value) && method_exists($value, '__toString'))) {
            foreach($this->regex as $regex => $replace) {

                if(preg_match($regex, (string)$value))
                    return preg_replace($regex, $replace, $value);
            }
        }

       return $value;
    }
942828
private function getValue($value)
    {
        if (!is_string($value)) {
            return $value;
        }

        if ($value[0] != '%' || $value[strlen($value) - 1] != '%')  {
            return $value;
        }

        $parameter = trim($value, '%');
        if ($this->container->hasParameter($parameter)) {
            return $this->container->getParameter($parameter);
        }

        return $value;
    }
1323206
public function displayValue( $value )
    {
        if ( isset( $this->values[$value] ) )
        {
            $value = $this->values[$value];
        }

        if ( $this->translationEnabled )
        {
            $value = parent::displayValue( $value );
        }

        return $value;
    }
1304975
protected function processItem($value): string
	{
		if (Utils::isList($value)) {
			return $this->processList($value);
		}

		return $this->processHash($value);
	}
1085132
public function resolveServices($value)
    {
        if (is_array($value)) {
            foreach ($value as $k => $v) {
                $value[$k] = $this->resolveServices($v);
            }
        } elseif ($value instanceof Reference) {
            $value = $this->get((string) $value, $value->getInvalidBehavior());
        } elseif ($value instanceof Definition) {
            $value = $this->createService($value, null);
        } elseif ($value instanceof Expression) {
            $value = $this->getExpressionLanguage()->evaluate($value, array('container' => $this));
        }

        return $value;
    }
219881
final public static function resolveValue($value, AbstractPlatform $platform)
    {
        if ($value instanceof DomainId) {
            $class = \get_class($value);
            $type = Type::INTEGER;

            foreach (self::$mapping as $mapping) {
                if ($class === $mapping['class']) {
                    $type = $mapping['data_type'] ?? $type;
                    break;
                }
            }

            return self::getType($type)->convertToPHPValue($value->isEmpty() ? null : $value->toString(), $platform);
        }

        return $value;
    }
1012106
public static function resolve($value)
    {
        switch (strtolower($value)) {
            case self::NEWEST:
                return self::NEWEST;
            case self::AUTHORIZED:
                return self::AUTHORIZED;
            case self::NOT_AUTHORIZED:
                return self::NOT_AUTHORIZED;
            case self::PAID:
                return self::PAID;
            case 'canceled':
            case self::CANCELLED:
                return self::CANCELLED;
            case self::WAITING:
                return self::WAITING;
        }

        return null;
    }
765429
protected function resolveInstanceMethod($value)
	{
		$callable = explode('->', $value);
		$instantiator = $this->instantiator;
		$callable[0] = $instantiator($callable[0]);
		return function (...$params) use ($callable) {
			return call_user_func_array($callable, $params);
		};
	}