public function transform($value = null)
 {
     if ($value === null) {
         return null;
     }
     if (!$value instanceof Identifiable) {
         throw new TransformationFailedException('Value was not instance of Identifiable, type was: "' . \NGS\Utils::getType($value) . '"');
     }
     return $value->URI;
 }
 public function transform($value)
 {
     if ($value instanceof Timestamp) {
         return $value->format($this->format);
     }
     if (is_string($value)) {
         return $value;
     }
     // By convention, transform() should return an empty string if NULL is passed.
     if ($value === null) {
         return '';
     }
     throw new TransformationFailedException('Could not transform value to string, was expecting NGS\\Timestamp, but given value was type :"' . \NGS\Utils::getType($value) . '"');
 }
 public function transform($value)
 {
     if ($value instanceof LocalDate) {
         $date = $value->toDateTime();
         return $date->format($this->format);
     } else {
         if (is_string($value)) {
             return $value;
         } else {
             if ($value === null) {
                 return "";
             } else {
                 throw new TransformationFailedException('Could not convert LocalDate value to string from type:"' . \NGS\Utils::getType($value) . '"');
             }
         }
     }
 }