~bakkerl/xibo/1.6

« back to all changes in this revision

Viewing changes to server/lib/service/restjson.class.php

  • Committer: Dan Garner
  • Date: 2010-02-25 23:12:42 UTC
  • mto: This revision was merged to the branch mainline in revision 127.
  • Revision ID: dan@xibo.org.uk-20100225231242-aax4avr37ozt5os6
[server] base REST class which will implement the methods and pass an DOMElement containing the repsonse message to its parent. Also includes a sample oauth client in php.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * You should have received a copy of the GNU Affero General Public License
19
19
 * along with Xibo.  If not, see <http://www.gnu.org/licenses/>.
20
20
 */
21
 
class RESTJson
 
21
class RestJson extends Rest
22
22
{
23
 
    private $db;
24
 
 
25
 
    public function __construct()
26
 
    {
27
 
        global $db;
28
 
        $this->db =& $db;
29
 
    }
30
 
 
31
 
    public function version()
32
 
    {
33
 
        return json_encode(array('Message' => Config::Version($this->db)));
 
23
    public function Respond($array)
 
24
    {
 
25
        return json_encode($array);
34
26
    }
35
27
}
36
28
?>