resolveDefinition example


        if (!$value instanceof Definition) {
            return parent::processValue($value$isRoot);
        }
        if ($isRoot) {
            // yes, we are specifically fetching the definition from the             // container to ensure we are not operating on stale data             $value = $this->container->getDefinition($this->currentId);
        }
        if ($value instanceof ChildDefinition) {
            $this->currentPath = [];
            $value = $this->resolveDefinition($value);
            if ($isRoot) {
                $this->container->setDefinition($this->currentId, $value);
            }
        }

        return parent::processValue($value$isRoot);
    }

    /** * Resolves the definition. * * @throws RuntimeException When the definition is invalid */

        if (!$value instanceof Definition) {
            return parent::processValue($value$isRoot);
        }
        if ($isRoot) {
            // yes, we are specifically fetching the definition from the             // container to ensure we are not operating on stale data             $value = $this->container->getDefinition($this->currentId);
        }
        if ($value instanceof ChildDefinition) {
            $this->currentPath = [];
            $value = $this->resolveDefinition($value);
            if ($isRoot) {
                $this->container->setDefinition($this->currentId, $value);
            }
        }

        return parent::processValue($value$isRoot);
    }

    /** * Resolves the definition. * * @throws RuntimeException When the definition is invalid */
Home | Imprint | This part of the site doesn't use cookies.