/**
  * Converts the given value so that it can be hydrated by the hydrator.
  *
  * @param mixed $value The original value.
  * @param array $data (optional) The original data for context.
  * @return mixed Returns the value that should be hydrated.
  */
 public function hydrate($value, $data = NULL)
 {
     if ($value instanceof \DateTime) {
         return $value;
     }
     if (is_string($value)) {
         $value = DateTime::createFromKnownFormats($value);
     }
     return $value;
 }