Re: Re: Re: PHP Annotations RFC + Patch

From: Date: Wed, 15 Sep 2010 06:09:02 +0000
Subject: Re: Re: Re: PHP Annotations RFC + Patch
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-49655@lists.php.net to get a copy of this message
Hi!
class User {
     [NotNull]
     [Integer]
     public $id;
     [NotNull]
     [Regexp('/[a-z]*/i')]
     [MinLength(2)]
     [MaxLength(255)]
     public $name;
     [NotNull]
     [Zipcode]
     public $zipcode;
}
I'm not sure I understand - why can't you use normal data structure to keep this information? Why it has to be in weird syntax with []s that has to be accessed through reflection?
powerful frameworks which can used by a great range of developers without learning a new syntax for it. Pleas do not argue about thy syntax of the annotation because this isn't final.
Whatever syntax it is, it is definitely new. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

« previous php.internals (#49655) next »