openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

PlainOutput.class.php (389B)


      1 <?php
      2 
      3 namespace cms\output;
      4 
      5 use cms\output\APIOutput;
      6 use util\json\JSON;
      7 use util\YAML;
      8 
      9 /**
     10  * Plain text rendering.
     11  */
     12 class PlainOutput extends APIOutput
     13 {
     14 	/**
     15      * Renders the output as plain text.
     16      */
     17     protected function renderOutput( $data )
     18 	{
     19 		//return YAML::dump($data);
     20 		return print_r($data);
     21 	}
     22 
     23 	public function getContentType()
     24 	{
     25 		return 'text/plain';
     26 	}
     27 }