Open Monograph Press  3.3.0
Representative.inc.php
1 <?php
17 class Representative extends DataObject {
22  function getMonographId() {
23  return $this->getData('monographId');
24  }
25 
30  function setMonographId($monographId) {
31  return $this->setData('monographId', $monographId);
32  }
33 
38  function setRole($role) {
39  $this->setData('role', $role);
40  }
41 
46  function getRole() {
47  return $this->getData('role');
48  }
49 
54  function getNameForONIXCode() {
55  $onixCodelistItemDao = DAORegistry::getDAO('ONIXCodelistItemDAO'); /* @var $onixCodelistItemDao ONIXCodelistItemDAO */
56  if ($this->getIsSupplier()) {
57  $listName = 'List93'; // List93 -> Publisher to retailers, Wholesaler, etc
58  } else {
59  $listName = 'List69'; // List93 -> Local Publisher, Sales Agent, etc
60  }
61  $codes =& $onixCodelistItemDao->getCodes($listName);
62  return $codes[$this->getRole()];
63  }
64 
69  function setRepresentativeIdType($representativeIdType) {
70  $this->setData('representativeIdType', $representativeIdType);
71  }
72 
78  return $this->getData('representativeIdType');
79  }
80 
85  function setRepresentativeIdValue($representativeIdValue) {
86  $this->setData('representativeIdValue', $representativeIdValue);
87  }
88 
94  return $this->getData('representativeIdValue');
95  }
96 
101  function getName() {
102  return $this->getData('name');
103  }
104 
109  function setName($name) {
110  $this->setData('name', $name);
111  }
112 
117  function getPhone() {
118  return $this->getData('phone');
119  }
120 
125  function setPhone($phone) {
126  $this->setData('phone', $phone);
127  }
128 
133  function getEmail() {
134  return $this->getData('email');
135  }
136 
141  function setEmail($email) {
142  $this->setData('email', $email);
143  }
144 
149  function getUrl() {
150  return $this->getData('url');
151  }
152 
157  function setUrl($url) {
158  $this->setData('url', $url);
159  }
160 
165  function getIsSupplier() {
166  return $this->getData('isSupplier');
167  }
168 
173  function setIsSupplier($isSupplier) {
174  $this->setData('isSupplier', $isSupplier);
175  }
176 }
177 
Representative\setIsSupplier
setIsSupplier($isSupplier)
Definition: Representative.inc.php:173
DataObject\getData
& getData($key, $locale=null)
Definition: DataObject.inc.php:100
DataObject
Any class with an associated DAO should extend this class.
Definition: DataObject.inc.php:18
DAORegistry\getDAO
static & getDAO($name, $dbconn=null)
Definition: DAORegistry.inc.php:57
Representative\getPhone
getPhone()
Definition: Representative.inc.php:117
Representative\setRepresentativeIdType
setRepresentativeIdType($representativeIdType)
Definition: Representative.inc.php:69
Representative
Basic class describing a representative composite type (used on the ONIX templates for publication fo...
Definition: Representative.inc.php:17
Representative\getRole
getRole()
Definition: Representative.inc.php:46
Representative\setPhone
setPhone($phone)
Definition: Representative.inc.php:125
Representative\getRepresentativeIdType
getRepresentativeIdType()
Definition: Representative.inc.php:77
Representative\setMonographId
setMonographId($monographId)
Definition: Representative.inc.php:30
Representative\getName
getName()
Definition: Representative.inc.php:101
Representative\setName
setName($name)
Definition: Representative.inc.php:109
Representative\setRepresentativeIdValue
setRepresentativeIdValue($representativeIdValue)
Definition: Representative.inc.php:85
Representative\setUrl
setUrl($url)
Definition: Representative.inc.php:157
Representative\getUrl
getUrl()
Definition: Representative.inc.php:149
Representative\getRepresentativeIdValue
getRepresentativeIdValue()
Definition: Representative.inc.php:93
Representative\getIsSupplier
getIsSupplier()
Definition: Representative.inc.php:165
Representative\getEmail
getEmail()
Definition: Representative.inc.php:133
Representative\getNameForONIXCode
getNameForONIXCode()
Definition: Representative.inc.php:54
Representative\setRole
setRole($role)
Definition: Representative.inc.php:38
Representative\getMonographId
getMonographId()
Definition: Representative.inc.php:22
DataObject\setData
setData($key, $value, $locale=null)
Definition: DataObject.inc.php:132
Representative\setEmail
setEmail($email)
Definition: Representative.inc.php:141