Forked from damienalexandre/New way to set the encoder.
          
        
    
          Created
          December 31, 2011 19:04 
        
      - 
      
 - 
        
Save piotrplenik/1545031 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
damienalexandre renamed this gist
Jan 30, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,6 @@ $this->serializer = new \Symfony\Component\Serializer\Serializer(); $this->serializer->addNormalizer(new \Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer()); $this->serializer->setEncoder('xml', new \Symfony\Component\Serializer\Encoder\XmlEncoder()); return $this->createResponse($this->serializer->encode($page, 'xml'), 200, array('Content-Type' => 'application/xml'));  - 
        
damienalexandre revised this gist
Jan 23, 2011 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ <?php // Inside your action $this->serializer = new \Symfony\Component\Serializer\Serializer(); $this->serializer->addNormalizer(new \Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer()); $this->serializer->addEncoder('xml', new \Symfony\Component\Serializer\Encoder\XmlEncoder());  - 
        
damienalexandre created this gist
Jan 23, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ $this->serializer = new \Symfony\Component\Serializer\Serializer(); $this->serializer->addNormalizer(new \Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer()); $this->serializer->addEncoder('xml', new \Symfony\Component\Serializer\Encoder\XmlEncoder()); return $this->createResponse($this->serializer->encode($page, 'xml'), 200, array('Content-Type' => 'application/xml'));