예제 #1
0
 function setFile($filename, $filetype = AMP_CONTENT_DOCUMENT_TYPE_DEFAULT)
 {
     parent::setFile($filename, $filetype);
     if ($this->verifyFileType()) {
         if ('img' != $this->getFileType()) {
             return false;
         }
     }
     $this->_image =& new AMP_System_File_Image($this->getPath());
 }
예제 #2
0
 function &getDocLinkRef()
 {
     require_once 'AMP/Content/Article/DocumentLink.inc.php';
     $empty_value = false;
     if (!($doc = $this->getDocumentLink())) {
         return $empty_value;
     }
     $doclink = new DocumentLink();
     $doclink->setFile($doc, $this->getDocLinkType());
     return $doclink;
 }