public function setDuration($value) { if (($value = TPropertyValue::ensureInteger($value)) < 0) { throw new TInvalidDataValueException('outputcache_duration_invalid', get_class($this)); } $this->_duration = $value; }