Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
ArtworkFile.inc.php
1 <?php
2 
17 import('classes.monograph.MonographFile');
18 
19 class ArtworkFile extends MonographFile {
21  var $_imageInfo;
22 
26  function ArtworkFile() {
27  parent::MonographFile();
28  }
29 
30 
31  //
32  // Getters and Setters
33  //
38  function getCaption() {
39  return $this->getData('caption');
40  }
41 
46  function setCaption($caption) {
47  return $this->setData('caption', $caption);
48  }
49 
54  function getCredit() {
55  return $this->getData('credit');
56  }
57 
62  function setCredit($credit) {
63  return $this->setData('credit', $credit);
64  }
65 
70  function getCopyrightOwner() {
71  return $this->getData('copyrightOwner');
72  }
73 
78  function setCopyrightOwner($owner) {
79  return $this->setData('copyrightOwner', $owner);
80  }
81 
87  return $this->getData('copyrightOwnerContact');
88  }
89 
94  function setCopyrightOwnerContactDetails($contactDetails) {
95  return $this->setData('copyrightOwnerContact', $contactDetails);
96  }
97 
102  function getPermissionTerms() {
103  return $this->getData('terms');
104  }
110  function setPermissionTerms($terms) {
111  return $this->setData('terms', $terms);
112  }
118  function getPermissionFileId() {
119  return $this->getData('permissionFileId');
120  }
126  function setPermissionFileId($fileId) {
127  return $this->setData('permissionFileId', $fileId);
128  }
134  function getChapterId() {
135  return $this->getData('chapterId');
136  }
142  function setChapterId($chapterId) {
143  return $this->setData('chapterId', $chapterId);
144  }
150  function getContactAuthor() {
151  return $this->getData('contactAuthor');
152  }
158  function setContactAuthor($authorId) {
159  return $this->setData('contactAuthor', $authorId);
160  }
166  function getWidth() {
167  if (!$this->_imageInfo) {
168  $this->_imageInfo = getimagesize($this->getFilePath());
169  }
170  return $this->_imageInfo[0];
171  }
172 
177  function getHeight() {
178  if (!$this->_imageInfo) {
179  $monographFile =& $this->getFile();
180  $this->_imageInfo = getimagesize($this->getFilePath());
181  }
182  return $this->_imageInfo[1];
183  }
184 
190  function copyEditableMetadataFrom($monographFile) {
191  if (is_a($monographFile, 'ArtworkFile')) {
192  $this->setCaption($monographFile->getCaption());
193  $this->setCredit($monographFile->getCredit());
194  $this->setCopyrightOwner($monographFile->getCopyrightOwner());
195  $this->setCopyrightOwnerContactDetails($monographFile->getCopyrightOwnerContactDetails());
196  $this->setPermissionTerms($monographFile->getPermissionTerms());
197  }
198 
199  parent::copyEditableMetadataFrom($monographFile);
200  }
201 }
202 
203 ?>
Artwork file class.
copyEditableMetadataFrom($monographFile)
setCaption($caption)
setCredit($credit)
getCopyrightOwnerContactDetails()
& getData($key, $locale=null)
Monograph file class.
setPermissionTerms($terms)
setContactAuthor($authorId)
setData($key, $value, $locale=null)
setCopyrightOwnerContactDetails($contactDetails)
setChapterId($chapterId)
setPermissionFileId($fileId)
setCopyrightOwner($owner)