File modules/cms/output/PlainOutput.class.php
Last commit: Sun Jan 30 23:38:42 2022 +0100 dankert Refactoring: Only 1 http-endpoint for both the UI and the API. Path "/api" is not available any more, all API data is served under "/".
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 }
Downloadmodules/cms/output/PlainOutput.class.php
History Sun, 30 Jan 2022 23:38:42 +0100 dankert Refactoring: Only 1 http-endpoint for both the UI and the API. Path "/api" is not available any more, all API data is served under "/".