Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function sanitize()
 {
     if ($this->canSanitize()) {
         return new \DateTime($this->getInput());
     }
     return parent::sanitize();
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function sanitize()
 {
     if ($this->isValid()) {
         return $this->getInput();
     } elseif ($this->canSanitize()) {
         return $this->default;
     } else {
         return parent::sanitize();
     }
 }