Re: PHP 4.0 Bug #5343: a way of implementing class methods

From: Date: Sun, 02 Jul 2000 15:33:06 +0000
Subject: Re: PHP 4.0 Bug #5343: a way of implementing class methods
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-23222@lists.php.net to get a copy of this message
I´ve proposed a similar enhancement before (wasn´t implemented), unfortunately it isn´t possible to include/require files inside classes but outside it´s method... I´d welcome this kind of functionality. It´s sometimes needed to equip classes with some standard methods and making class X a subclass of Y of Z of A of B is not the fine way ;) regards teo@digiro.net wrote:
From:             teo@digiro.net
Operating system: PHP version:      4.0.1
PHP Bug Type:     Feature/Change Request
Bug description: a way of implementing class methods How about: function Foo::Bar() { //implementation of method Bar' in class Foo' } ppl usually separate the functionality in different files, and with classes this is only possible by forwarding calls to regular functions, or by making use of derivation, which is not the best practice. IMHO that would imply small changes to the parser (to recognize `::' syntax), what do you think?
-- o----------0-¬---------O-·---¬----o---®-----o o O ° . | http://www.kiffen.de | pRoteçt y0ur bRaín |0 O ° ¤ ° · 0°·³°²'²³-¹'³´³°^°³~³²³°'³²²¨³²^³¹³²°²³`³º³°Þ ° o © ° . · | psychedelic experience | gott@kiffen.de | O ° o ° o-¬--o--0-----©-·--O-----o-----0-¤----------o 0 ° · ° . ¤ ·

« previous php.dev (#23222) next »