Beispiel #1
0
 public static IPhpValue MakePathValueRelatedToFile(KnownConstInfo value, TranslationInfo info)
 {
     if (value.Value == null)
     {
         info.Log(MessageLevels.Error,
                string.Format("Const value {0} must be a string (currently is null)", value.Name));
         return new PhpConstValue("???");
     }
     if (value.Value is string)
         return MakePathValueRelatedToFile(value.Value as string);
     info.Log(MessageLevels.Warning,
            string.Format("Const value {0} must be a string", value.Name));
     return new PhpConstValue("???");
 }
Beispiel #2
0
 public static IPhpValue MakePathValueRelatedToFile(KnownConstInfo value, TranslationInfo info)
 {
     if (value.Value == null)
     {
         info.Log(MessageLevels.Error,
                  string.Format("Const value {0} must be a string (currently is null)", value.Name));
         return(new PhpConstValue("???"));
     }
     if (value.Value is string)
     {
         return(MakePathValueRelatedToFile(value.Value as string));
     }
     info.Log(MessageLevels.Warning,
              string.Format("Const value {0} must be a string", value.Name));
     return(new PhpConstValue("???"));
 }