Nette\DI\ContainerBuilder::formatPhp PHP Method

formatPhp() public method

Deprecation:
public formatPhp ( $statement, $args )
    public function formatPhp($statement, $args)
    {
        array_walk_recursive($args, function (&$val) {
            if ($val instanceof Statement) {
                $val = $this->completeStatement($val);
            } elseif ($val === $this) {
                trigger_error("Replace object ContainerBuilder in Statement arguments with '@container'.", E_USER_DEPRECATED);
                $val = self::literal('$this');
            } elseif ($val instanceof ServiceDefinition) {
                $val = '@' . current(array_keys($this->getDefinitions(), $val, TRUE));
            }
        });
        return (new PhpGenerator($this))->formatPhp($statement, $args);
    }