|
dmBridge PHP API
|
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 00019 class DMGenericObjectViewer extends DMAbstractViewer 00020 implements DMObjectViewerDelegate { 00021 00025 public function getHTMLTag() { 00026 // width & height may be strings (%s) 00027 return sprintf('<object type="%s" data="%s" width="%s" height="%s"> 00028 <param name="src" value="%s" /> 00029 <a href="%s">%s</a> 00030 </object>', 00031 $this->getMediaType(), 00032 DMString::websafe($this->getObject()->getFileURL()), 00033 $this->getWidth(), $this->getHeight(), 00034 DMString::websafe($this->getObject()->getFileURL()), 00035 DMString::websafe($this->getObject()->getFileURL()), 00036 DMString::websafe($this->getObject()->getFilename()) 00037 ); 00038 } 00039 00043 public function getHTMLTagNoJS() { 00044 return $this->getHTMLTag(); 00045 } 00046 00050 public function getName() { 00051 return "Generic Object Viewer"; 00052 } 00053 00054 }