コード例 #1
0
 protected function doClean($value)
 {
     if ($this->getOption('shortenUrl')) {
         $value = $this->shortenText($value);
     }
     return parent::doClean($value);
 }
コード例 #2
0
 protected function doClean($value)
 {
     $value = parent::doClean($value);
     if ($this->isEmpty($value)) {
         return $this->getEmptyValue();
     }
     if (!in_array($value, sfImageHandler::getAllowedSize())) {
         throw new sfValidatorError($this, 'Not allowed');
     }
     return $value;
 }