ContainerBuilder.php
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;
    }
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;
    }
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 ; }
Replaces service references by the real service instance and evaluates expressions.

@param mixed $value A value

@return mixed The same value with all service references replaced by
the real service instances and all expressions evaluated
Replaces service references by the real service instance and evaluates expressions .