示例#1
0
 /** Setter function for string type. */
 protected function setString($property, $value, $nullable = false)
 {
     if ($value === null) {
         if ($nullable) {
             $this->{$property} = null;
         } else {
             $this->warn("Null value given for '{$property}' property. Expected a string. Property not changed.");
         }
     } else {
         try {
             $this->{$property} = Payone_Log4php_LoggerOptionConverter::toStringEx($value);
         } catch (Exception $ex) {
             $value = var_export($value, true);
             $this->warn("Invalid value given for '{$property}' property: [{$value}]. Expected a string. Property not changed.");
         }
     }
 }