Beispiel #1
0
 /**
  * @internal
  *
  * @param $name
  * @param $value
  * @return Result|void
  * @throws Main\ArgumentOutOfRangeException
  */
 public function initField($name, $value)
 {
     if ($this->isCalculatedField($name)) {
         $this->calculatedFields->set($name, $value);
         return new Result();
     }
     parent::initField($name, $value);
 }
Beispiel #2
0
 /**
  * @param string $name			Field name.
  * @return mixed|null
  */
 public function getField($name)
 {
     if ($this->isCalculatedField($name)) {
         if (isset($this->calculatedFields[$name]) || array_key_exists($name, $this->calculatedFields)) {
             return $this->calculatedFields->get($name);
         }
         return null;
     }
     return parent::getField($name);
 }
Beispiel #3
0
 /**
  * @return bool
  */
 public function isChanged()
 {
     return ($changed = $this->fields->getChangedValues()) && !empty($changed);
 }
 /**
  * @param array $values
  */
 public function setFields(array $values)
 {
     $this->fields->resetValues($values);
 }