list($_REQUEST); Header("Content-Type: application/json; charset=utf-8"); print json_readable_encode($result); } if (isset($_REQUEST['id'])) { $category = $customCategoryRepository->getCategory($_REQUEST['id']); if ($category) { $customCategoryRepository->recordAccess($_REQUEST['id']); } Header("Content-Type: application/yaml; charset=utf-8"); Header("Content-Disposition: inline; filename=\"{$_REQUEST['id']}.yaml\""); print $category; } if (isset($_REQUEST['action']) && $_REQUEST['action'] === 'save') { $content = file_get_contents("php://input"); $id = $customCategoryRepository->saveCategory($content); $customCategoryRepository->recordAccess($id); Header("Content-Type: text/plain; charset=utf-8"); print $id; }