|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I was asking myself if the super-possibilities offered by the runkit
extension could be used in a "good" way I'll like to use runkit to define superglobals like $config, for example./ I'll like to use runkit to modify Class extension & implementation, making it more "Javascript" like. I'm very frustated in not beeing able to extend an existing classes For example, i'll like to use, in every one of my script "sql" static classe, regardless the database system. - i know about PDO, that's just an example - I'll like to use class sql { //noting here } And in mysql.php modify sql { function connect(){ } } and in mysql/plugin/superlinks modify sql { function fetch(){ $tmp=before:fetch(); return $tmp=str_replace("<a href=....","<a href='FOO',..); } } That's not a great post, my true question is "Might we use the supergodpower runkit offers", or - not PS : that's just an evolution of the EXISTING "Overload" process |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Oct 20, 5:06 pm, 131....@cloudyks.org ("131") wrote:
> I was asking myself if the super-possibilities offered by the runkit > extension could be used in a "good" way > I'll like to use runkit to define superglobals like $config, for example./ > I'll like to use runkit to modify Class extension & implementation, making > it more "Javascript" like. > > I'm very frustated in not beeing able to extend an existing classes > > For example, i'll like to use, in every one of my script "sql" static > classe, regardless the database system. - i know about PDO, that's just an > example - > > I'll like to use > class sql { > //noting here > > } > > And in mysql.php > modify sql { > function connect(){ > } > > } > > and in mysql/plugin/superlinks > modify sql { > function fetch(){ > $tmp=before:fetch(); > return $tmp=str_replace("<a href=....","<a href='FOO',..); > } > > } > > That's not a great post, my true question is > "Might we use the supergodpower runkit offers", or - not > > PS : that's just an evolution of the EXISTING "Overload" process I'm not a big fan of modifying classes at runtime. There are plenty of other ways to achieve what you're trying to do without using runkit. Can you offer an example of something that would be very difficult or impossible to do without runkit? |
|
![]() |
| Outils de la discussion | |
|
|