dmBridge PHP API
DMJSONPRepresentationTransformerV1.php
00001 <?php
00002 #
00003 # dmBridge: a data access framework for CONTENTdm(R)
00004 #
00005 # Copyright © 2009, 2010, 2011 Board of Regents of the Nevada System of Higher
00006 # Education, on behalf of the University of Nevada, Las Vegas
00007 #
00008 
00013 class DMJSONPRepresentationTransformerV1
00014 extends DMJSONRepresentationTransformerV1
00015 implements DMHTTPAPIRepresentationTransformer {
00016 
00017    private $callback = "dmBridgeRequest";
00018 
00019 
00020    public function __construct() {
00021       parent::__construct();
00022       $callback = DMHTTPRequest::getCurrent()->getURI()->getQueryValue("callback");
00023       if ($callback) {
00024          $this->callback = substr($callback, 0, 100);
00025          $this->callback = DMString::paranoid($this->callback, array("_", ".", ","));
00026       }
00027    }
00028 
00029    protected function output() {
00030       return sprintf("%s(%s)", $this->callback, parent::output());
00031    }
00032 
00033 }
 All Data Structures Functions Variables