dmBridge PHP API
UNLVRandomController.php
00001 <?php
00002 #
00003 # UNLVRandom: a dmBridge module for random objects
00004 #
00005 # Copyright © 2011 Board of Regents of the Nevada System of Higher
00006 # Education, on behalf of the University of Nevada, Las Vegas
00007 #
00008 
00016 class UNLVRandomController {
00017 
00018    public function random() {
00019       if (!$obj = UNLVRandomObject::getRandomObject()) {
00020          header("HTTP/1.1 204 No Content");
00021          die;
00022       }
00023       $output = DMHTTPResponseFactory::getTransformer();
00024       $output->outputHeaders();
00025       die($output->transformObject($obj));
00026    }
00027 
00028 }
 All Data Structures Functions Variables