Bundle/ViewReferenceBundle/Builder/Chain/ViewReferenceTransformerChain.php
public function addTransformer(DataTransformerInterface $transformer, $viewNamespace, $outputFormat)
    {
        if (!array_key_exists($viewNamespace, $this->viewsReferenceTransformers)) {
            $this->viewsReferenceTransformers[$viewNamespace] = [];
        }
        if (!array_key_exists($outputFormat, $this->viewsReferenceTransformers[$viewNamespace])) {
            $this->viewsReferenceTransformers[$viewNamespace][$outputFormat] = null;
        }
        $this->viewsReferenceTransformers[$viewNamespace][$outputFormat] = $transformer;
    }
public function addTransformer(DataTransformerInterface $transformer, $viewNamespace, $outputFormat)
    {
        if (!array_key_exists($viewNamespace, $this->viewsReferenceTransformers)) {
            $this->viewsReferenceTransformers[$viewNamespace] = [];
        }
        if (!array_key_exists($outputFormat, $this->viewsReferenceTransformers[$viewNamespace])) {
            $this->viewsReferenceTransformers[$viewNamespace][$outputFormat] = null;
        }
        $this->viewsReferenceTransformers[$viewNamespace][$outputFormat] = $transformer;
    }
public function addTransformer ( DataTransformerInterface $ transformer , $ viewNamespace , $ outputFormat ) { if ( ! array_key_exists ( $ viewNamespace , $ this -> viewsReferenceTransformers ) ) { $ this -> viewsReferenceTransformers [ $ viewNamespace ] = [ ] ; } if ( ! array_key_exists ( $ outputFormat , $ this -> viewsReferenceTransformers [ $ viewNamespace ] ) ) { $ this -> viewsReferenceTransformers [ $ viewNamespace ] [ $ outputFormat ] = null ; } $ this -> viewsReferenceTransformers [ $ viewNamespace ] [ $ outputFormat ] = $ transformer ; }
add a view Manager.

@param DataTransformerInterface $viewManager
@param string                   $viewNamespace
add a view Manager .