Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49655 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45506 invoked from network); 15 Sep 2010 06:09:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Sep 2010 06:09:07 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.183 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.183 smtp183.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.183] ([67.192.241.183:51764] helo=smtp183.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AD/A2-33442-103609C4 for ; Wed, 15 Sep 2010 02:09:06 -0400 Received: from relay18.relay.dfw.mlsrvr.com (localhost [127.0.0.1]) by relay18.relay.dfw.mlsrvr.com (SMTP Server) with ESMTP id 623A116F2B3F; Wed, 15 Sep 2010 02:09:03 -0400 (EDT) Received: by relay18.relay.dfw.mlsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id AB28316F2B42; Wed, 15 Sep 2010 02:09:02 -0400 (EDT) Message-ID: <4C9062FE.6000901@sugarcrm.com> Date: Tue, 14 Sep 2010 23:09:02 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 MIME-Version: 1.0 To: Christian Kaps CC: "internals@lists.php.net" References: <39505F13-655A-43AF-941E-77750B7F7201@gmail.com> <001601cb543a$d81ebac0$885c3040$@com> <4C8FC695.2060800@sugarcrm.com> <4C8FD72B.1070108@sugarcrm.com> <4C905A99.9050802@mohiva.com> In-Reply-To: <4C905A99.9050802@mohiva.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Re: PHP Annotations RFC + Patch From: smalyshev@sugarcrm.com (Stas Malyshev) 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