File modules/cms/output/JsonOutput.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 8 /** 9 * JSON Rendering. 10 */ 11 class JsonOutput extends APIOutput 12 { 13 /** 14 * Renders the output in JSON Format. 15 */ 16 protected function renderOutput( $data ) 17 { 18 return JSON::encode($data); 19 } 20 21 public function getContentType() 22 { 23 return 'application/json'; 24 } 25 }
Download modules/cms/output/JsonOutput.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 "/".