dmBridge PHP API
DMAbstractViewer.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 
00016 abstract class DMAbstractViewer {
00017 
00019    private $helper;
00021    private $object;
00023    private $media_type;
00025    private $width;
00027    private $height;
00028 
00029 
00033    public function __construct() {
00034    }
00035 
00042    public function viewerWillRender() {
00043    }
00044 
00048    protected function getHelper() {
00049       return $this->helper;
00050    }
00051 
00055    public function setHelper(DMGenericTemplateHelper $helper) {
00056       $this->helper = $helper;
00057    }
00058 
00062    protected function getMediaType() {
00063       return $this->media_type;
00064    }
00065 
00069    public function setMediaType(DMMediaType $media_type) {
00070       $this->media_type = $media_type;
00071    }
00072 
00076    protected function getObject() {
00077       return $this->object;
00078    }
00079 
00083    public function setObject(DMObject $obj) {
00084       $this->object = $obj;
00085    }
00086 
00090    protected function getWidth() {
00091       $units = (round($this->width) == $this->width) ? "px" : "";
00092       return $this->width . $units;
00093    }
00094 
00098    public function setWidth($width) {
00099       $this->width = $width;
00100    }
00101 
00105    protected function getHeight() {
00106       $units = (round($this->height) == $this->height) ? "px" : "";
00107       return $this->height . $units;
00108    }
00109 
00113    public function setHeight($height) {
00114       $this->height = $height;
00115    }
00116 
00117 }
 All Data Structures Functions Variables