Example #1
0
 /**
  * Getter for hash, uses field's hash and adds max_digits and decimal_places as additional parameters for hashing
  * @return string
  */
 public function getHash()
 {
     if (!$this->hash) {
         $this->hash = md5($this->getDecimals() . '|' . $this->getDigits() . '|' . parent::getHash());
     }
     return $this->hash;
 }
Example #2
0
 /**
  * Getter for hash, uses field's hash and adds isForeignKey() as additional parameter for hashing
  * @return string
  */
 public function getHash()
 {
     if (!$this->hash) {
         $this->hash = md5($this->isForeignKey() . '|' . parent::getHash());
     }
     return $this->hash;
 }
Example #3
0
 /**
  * Update field in storage, sets hashes for field and it's model
  * @param Field $field
  */
 public function updateFieldSync($field)
 {
     $this->query('update [fields] set [hash] = %s where [name] = %s and [table] = %s', $field->getHash(), $field->getName(), $field->getModel()->GetTableName());
     $this->updateModelSync($field->getModel());
 }