dmBridge PHP API
UNLVHighlightedObject.php
00001 <?php
00002 #
00003 # UNLVHighlight: a dmBridge module for highlighting 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 
00015 class UNLVHighlightedObject {
00016 
00018    private $highlighted_date;
00019 
00023    public static function getHighlightedObject() {
00024       $ds = self::getDataStore();
00025       return ($ds) ? $ds->getHighlightedObject() : null;
00026    }
00027 
00031    public static function getDataStore() {
00032       $ds = DMDataStoreFactory::getDataStore();
00033       switch ($ds->getType()) {
00034          case DMDataStoreType::PDO_MySQL:
00035             $ds = UNLVHighlightMySQLDataStore::getInstance();
00036             break;
00037          case DMDataStoreType::PDO_SQLite:
00038             $ds = UNLVHighlightSQLiteDataStore::getInstance();
00039             break;
00040       }
00041       return $ds;
00042    }
00043 
00047    public function __construct(DMDateTime $date) {
00048       $this->setHighlightedDate($date);
00049    }
00050 
00054    public function getHighlightedDate() {
00055       return $this->highlighted_date;
00056    }
00057 
00061    public function setHighlightedDate(DMDateTime $date) {
00062       $this->highlighted_date = $date;
00063    }
00064 
00065 }
00066 
 All Data Structures Functions Variables