예제 #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);
 }
예제 #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);
 }
예제 #3
0
 /**
  * @return bool
  */
 public function isChanged()
 {
     return ($changed = $this->fields->getChangedValues()) && !empty($changed);
 }
예제 #4
0
 /**
  * @param array $values
  */
 public function setFields(array $values)
 {
     $this->fields->resetValues($values);
 }