Hendy Irawan wrote:
database because the metadata is already built-in. Just a rough
sketch:
[columnType: "VARCHAR", size: 20] public $name;
[columnType: "DATE"] public $birthDate;
We do exactly this in PHP 4 already. The base class gets the meta-data
from the DB and stores it in $this->_fields. No
Wez,
>(I added internals back in to the Cc:; presumably you missed that out
>by accident in your reply)
Thanks. Can you delete my email address from list as well please? :-) Grr.
stupid me. Hello spam bots.
I noticed I'd missed the list off cc, so I posted an edited version, which I
guess you'
On 4/18/05, Wez Furlong <[EMAIL PROTECTED]> wrote:
> Can you demonstrate some other practical use for attributes in PHP?
> (please post an example to the list, even if it's psuedo-code--we're
> mostly too busy to go off and read about something new until we've
> been persuaded it's worth doing ;-)
(I added internals back in to the Cc:; presumably you missed that out
by accident in your reply)
> Interfaces don't really provide this sort of functionality - take a look at
> c#,
> java or ruby to see
> better examples than mine of how attributes are used
Telling me to go and look at another l
>PHP has interfaces for this kind of thing, and they're clearer/cleaner
>to use than the code you've posted (for this case at least).
Interfaces don't really provide this sort of functionality - take a look at c#,
java or ruby to see
better examples than mine of how attributes are used.
I suppos
On Mon, 18 Apr 2005, George Schlossnagle wrote:
>
> On Apr 18, 2005, at 8:26 AM, Wez Furlong wrote:
> >
> >From a technical viewpoint, how do these attributes affect the class?
> > Are they simply no-ops that are tagged and made available via the
> > reflection API? How does this really help imp
On Apr 18, 2005, at 8:26 AM, Wez Furlong wrote:
From a technical viewpoint, how do these attributes affect the class?
Are they simply no-ops that are tagged and made available via the
reflection API? How does this really help improve PHP? I know it
sounds cool, but so does recording phpdoc commen
On 4/18/05, Wez Furlong <[EMAIL PROTECTED]> wrote:
> PHP has interfaces for this kind of thing, and they're clearer/cleaner
> to use than the code you've posted (for this case at least).
Yea, I completely agree.
> I'm not against the idea per-se, I just can't see a really good reason
> to justify
> I am playing around with an extension to the Zend Engine 2 to allow class
> properties and methods to be tagged with attributes. These attributes would
> then be accessible through the Reflection classes:
Sorry guys to just jump in, but Duncan's idea is an EXCELLENT idea IMHO... :-)
Let's go be
PHP has interfaces for this kind of thing, and they're clearer/cleaner
to use than the code you've posted (for this case at least).
It's also worth noting that the rendering of serialized data for an
object is usually better handled by the class of that object, not its
container. It is fine, of c
10 matches
Mail list logo