Is there such a thing?
I'd like to do something like this in PHP but I can't see how to do it from the PHP docs:
public class User : ValidationBase
{  
  [NotNullOrEmpty(Message = "Please enter a user name.")] 
  public string UserName { get; set; } 
}
What I'm looking for is the PHP equivalent of an ASP.NET/C# property attribute, which in the above example is signified by the [NotNullOrEmpty(Message = "Please enter a user name.")] line above the property declaration.