From 159a1ec5333652762b58aee4013f06fb2a0890aa Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Wed, 23 Apr 2014 20:01:08 +0000 Subject: [PATCH] Initial xml and json views for Config index and view --- api/app/View/Configs/json/index.ctp | 1 + api/app/View/Configs/json/view.ctp | 1 + api/app/View/Configs/xml/index.ctp | 2 ++ api/app/View/Configs/xml/view.ctp | 2 ++ 4 files changed, 6 insertions(+) create mode 100644 api/app/View/Configs/json/index.ctp create mode 100644 api/app/View/Configs/json/view.ctp create mode 100644 api/app/View/Configs/xml/index.ctp create mode 100644 api/app/View/Configs/xml/view.ctp diff --git a/api/app/View/Configs/json/index.ctp b/api/app/View/Configs/json/index.ctp new file mode 100644 index 000000000..86edf870a --- /dev/null +++ b/api/app/View/Configs/json/index.ctp @@ -0,0 +1 @@ +echo json_encode($configs); diff --git a/api/app/View/Configs/json/view.ctp b/api/app/View/Configs/json/view.ctp new file mode 100644 index 000000000..75fa758bd --- /dev/null +++ b/api/app/View/Configs/json/view.ctp @@ -0,0 +1 @@ +echo json_encode($config); diff --git a/api/app/View/Configs/xml/index.ctp b/api/app/View/Configs/xml/index.ctp new file mode 100644 index 000000000..b13a76093 --- /dev/null +++ b/api/app/View/Configs/xml/index.ctp @@ -0,0 +1,2 @@ +$xml = Xml::fromArray(array('response' => $configs)); +echo $xml->asXML(); diff --git a/api/app/View/Configs/xml/view.ctp b/api/app/View/Configs/xml/view.ctp new file mode 100644 index 000000000..7987d32e7 --- /dev/null +++ b/api/app/View/Configs/xml/view.ctp @@ -0,0 +1,2 @@ +$xml = Xml::fromArray(array('response' => $config)); +echo $xml->asXML();