Beispiel #1
0
 public function setNotes($s)
 {
     parent::set('notes', $s);
 }
Beispiel #2
0
 public function setSlaDays($i)
 {
     $i = (int) $i;
     if ($this->getId()) {
         if ($this->getSlaDays() != $i) {
             $this->slaDaysHasChanged = true;
         }
     }
     parent::set('slaDays', $i);
 }
Beispiel #3
0
 public function setRequestUri($s)
 {
     parent::set('requestUri', $s);
 }
 public function setName($s)
 {
     parent::set('name', $s);
 }
Beispiel #5
0
 public function setLabel($s)
 {
     parent::set('label', $s);
 }
Beispiel #6
0
 public function setDescription($s)
 {
     parent::set('description', $s);
 }
Beispiel #7
0
 public function setStatus($s)
 {
     parent::set('status', $s);
 }
Beispiel #8
0
 public function setApi_key($s)
 {
     parent::set('api_key', $s);
 }
Beispiel #9
0
 /**
  * Update the status and substatus
  *
  * The new status will delete the current substatus if
  * the current substatus is not valid for the new status
  *
  * @param string $string
  * @param int $substatus_id
  */
 public function setStatus($status, $substatus_id = null)
 {
     $oldStatus = $this->getStatus();
     $oldSubStatusId = $this->getSubstatus_id();
     parent::set('status', $status);
     if ($substatus_id) {
         try {
             $substatus = new Substatus($substatus_id);
             if ($substatus->getStatus() == $this->getStatus()) {
                 $this->setSubstatus($substatus);
             }
         } catch (\Exception $e) {
             // Invalid substatus will just ignored
         }
     } else {
         // See if there's a default substatus to set
         $zend_db = Database::getConnection();
         $result = $zend_db->query('select * from substatus where status=? and isDefault=1')->execute([$this->getStatus()]);
         if (count($result)) {
             $this->setSubstatus(new Substatus($result->fetch()));
         }
     }
     if ($this->getSubstatus_id()) {
         if ($this->getSubstatus()->getStatus() != $this->getStatus()) {
             $this->setSubstatus_id(null);
         }
     }
     // See if we need to update the closedDate
     $newStatus = $this->getStatus();
     if ($newStatus == 'closed') {
         if ($newStatus != $oldStatus || $this->getSubstatus_id() != $oldSubStatusId) {
             $this->setClosedDate(date(DATE_FORMAT));
         }
     }
 }
 public function setOrdering($s)
 {
     parent::set('ordering', $s);
 }
Beispiel #11
0
 public function setAuthenticationMethod($s)
 {
     parent::set('authenticationMethod', $s);
 }
 /**
  * Returns the file name used on the server
  *
  * We do not use the filename the user chose when saving the files.
  * We generate a unique filename the first time the filename is needed.
  * This filename will be saved in the database whenever this media is
  * finally saved.
  *
  * @return string
  */
 public function getInternalFilename()
 {
     $filename = parent::get('internalFilename');
     if (!$filename) {
         $filename = uniqid();
         parent::set('internalFilename', $filename);
     }
     return $filename;
 }
Beispiel #13
0
 public function setLongitude($f)
 {
     parent::set('longitude', (double) $f);
 }
 public function set($field, $value)
 {
     parent::set($field, $value);
 }
Beispiel #15
0
 public function setUsedForNotifications($b)
 {
     parent::set('usedForNotifications', $b ? 1 : 0);
 }