dmBridge PHP API
DMControlPanelView.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 DMControlPanelView extends DMInternalView implements DMURIAddressable {
00014 
00018    private $query;
00019 
00020    private $template_vars = array();
00021 
00026    public function __construct(DMTemplate $tpl, DMSession $session) {
00027       parent::__construct($tpl, $session);
00028       $this->setHelper(new DMControlPanelTemplateHelper($this, $session));
00029    }
00030 
00034    public function getQuery() {
00035       return $this->query;
00036    }
00037 
00041    public function setQuery(DMQuery $query) {
00042       $this->query = $query;
00043    }
00044 
00049    public function addTemplateVar($key, $value) {
00050       $this->template_vars[$key] = $value;
00051    }
00052 
00057    public function getTemplateVar($var) {
00058       return array_key_exists($var, $this->template_vars)
00059             ? $this->template_vars[$var] : null;
00060    }
00061 
00065    public function setTemplateVars(array $vars) {
00066       $this->template_vars = $vars;
00067    }
00068 
00072    public function getURI() {
00073       return DMInternalURI::getURIWithParams("admin");
00074    }
00075 
00081    public function getVar($var) {
00082       return $this->getTemplateVar($var);
00083    }
00084 
00085 }
00086 
 All Data Structures Functions Variables