dmBridge PHP API
DMTemplate.php
00001 <?php
00002 #
00003 # dmBridge: a data access framework for CONTENTdm(R)
00004 #
00005 # Copyright © 2009, 2010 Board of Regents of the Nevada System of Higher
00006 # Education, on behalf of the University of Nevada, Las Vegas
00007 #
00008 
00015 class DMTemplate extends DMModel {
00016 
00018    private $absolute_pathname;
00020    private $relative_pathname;
00022    private $template_set;
00023 
00029    public function __construct(DMTemplateSet $ts, $relative_pathname) {
00030       $this->setTemplateSet($ts);
00031       $this->setRelativePathname($relative_pathname);
00032    }
00033 
00037    public function getAbsolutePathname() {
00038       return $this->absolute_pathname;
00039    }
00040 
00044    public function setAbsolutePathname($pathname) {
00045       $this->absolute_pathname = $pathname;
00046    }
00047 
00052    public function getRelativePathname() {
00053       return $this->relative_pathname;
00054    }
00055 
00059    public function setRelativePathname($pathname) {
00060       $this->relative_pathname = $pathname;
00061       $this->absolute_pathname = $_SERVER['DOCUMENT_ROOT']
00062             . $this->getTemplateSet()->getPath() . $pathname;
00063    }
00064 
00068    public function getTemplateSet() {
00069       return $this->template_set;
00070    }
00071 
00075    public function setTemplateSet(DMTemplateSet $ts) {
00076       $this->template_set = $ts;
00077    }
00078 
00079 }
 All Data Structures Functions Variables