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()); }
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; }