dumpParameter example

$id = (string) $this->container->getAlias($id);
            }

            if (null !== $this->referenceVariables && isset($this->referenceVariables[$id])) {
                return $this->dumpValue($this->referenceVariables[$id]$interpolate);
            }

            return $this->getServiceCall($id$value);
        } elseif ($value instanceof Expression) {
            return $this->getExpressionLanguage()->compile((string) $value['container' => 'container']);
        } elseif ($value instanceof Parameter) {
            return $this->dumpParameter($value);
        } elseif (true === $interpolate && \is_string($value)) {
            if (preg_match('/^%([^%]+)%$/', $value$match)) {
                // we do this to deal with non string values (Boolean, integer, ...)                 // the preg_replace_callback converts them to strings                 return $this->dumpParameter($match[1]);
            } else {
                $replaceParameters = fn ($match) => "'.".$this->dumpParameter($match[2]).".'";

                $code = str_replace('%%', '%', preg_replace_callback('/(?<!%)(%)([^%]+)\1/', $replaceParameters$this->export($value)));

                return $code;
            }
$id = (string) $this->container->getAlias($id);
            }

            if (null !== $this->referenceVariables && isset($this->referenceVariables[$id])) {
                return $this->dumpValue($this->referenceVariables[$id]$interpolate);
            }

            return $this->getServiceCall($id$value);
        } elseif ($value instanceof Expression) {
            return $this->getExpressionLanguage()->compile((string) $value['this' => 'container']);
        } elseif ($value instanceof Parameter) {
            return $this->dumpParameter($value);
        } elseif (true === $interpolate && \is_string($value)) {
            if (preg_match('/^%([^%]+)%$/', $value$match)) {
                // we do this to deal with non string values (Boolean, integer, ...)                 // the preg_replace_callback converts them to strings                 return $this->dumpParameter($match[1]);
            } else {
                $replaceParameters = function D$match) {
                    return "'.".$this->dumpParameter($match[2]).".'";
                };

                $code = str_replace('%%', '%', preg_replace_callback('/(?<!%)(%)([^%]+)\1/', $replaceParameters$this->export($value)));

                
$id = (string) $this->container->getAlias($id);
            }

            if (null !== $this->referenceVariables && isset($this->referenceVariables[$id])) {
                return $this->dumpValue($this->referenceVariables[$id]$interpolate);
            }

            return $this->getServiceCall($id$value);
        } elseif ($value instanceof Expression) {
            return $this->getExpressionLanguage()->compile((string) $value['container' => 'container']);
        } elseif ($value instanceof Parameter) {
            return $this->dumpParameter($value);
        } elseif (true === $interpolate && \is_string($value)) {
            if (preg_match('/^%([^%]+)%$/', $value$match)) {
                // we do this to deal with non string values (Boolean, integer, ...)                 // the preg_replace_callback converts them to strings                 return $this->dumpParameter($match[1]);
            } else {
                $replaceParameters = fn ($match) => "'.".$this->dumpParameter($match[2]).".'";

                $code = str_replace('%%', '%', preg_replace_callback('/(?<!%)(%)([^%]+)\1/', $replaceParameters$this->export($value)));

                return $code;
            }
Home | Imprint | This part of the site doesn't use cookies.