Ejemplo n.º 1
0
 /// <summary>
 /// Verifies that the contents of a variable can be called as a function.
 /// </summary>
 /// <param name="caller">Current class context.</param>
 /// <param name="variable">The variable.</param>
 /// <param name="syntaxOnly">If <B>true</B>, it is only checked that has <pararef name="variable"/>
 /// a valid structure to be used as a callback. if <B>false</B>, the existence of the function (or
 /// method) is also verified.</param>
 /// <returns><B>true</B> if <paramref name="variable"/> denotes a function, <B>false</B>
 /// otherwise.</returns>
 public static bool IsCallable(PhpValue variable, bool syntaxOnly = false)
 {
     return(PhpVariable.IsValidCallback(variable.AsCallable()));  // TODO: check syntaxOnly || can be bound
 }