FAQ
Hello out there!

This morning I asked myself whether it's possible to extend a class without
calling the child, but the initially extended class?
It can, in some circumstances, really be important.
I.e.: I build an CLI-shell interface for some back-end stuff I'd to do - and
it really is a pain in the ass to do all of the include-register-calls' for
each of a newly written extension. It could be so much easier, considered
having a possibility to do the include-[I'm usable] way ;)

I mean, for instance:

<?
interface XorePwnI {
public function XorePwn ( $_uu, $_xw );
/*
...
*/
}
class XorePwn implements XorePwnI {
public function XorePwn ( $_uu, $_xw ) {
return true;
}
}
class XorePwn_Intruder extends XorePwn {
public function CorePwn ( $_uu, $_xw ) {
return *$this->XorePwn( $_uu, $_xw ) ;* // obviously, that's not possible,
but a demo
}
}
?>

So - is there a way to dynamically extend a class (not the traditionally
"get-the-class,-clone-the-class-and-add-sugar"-way) ?

I'd really like to hear some cool explanations - but, well, please don't
tell me that's not possible, because it's not possible.. ;)

So, cheers guys,
--
(c) *Kenan Sulayman*
*Freelance Designer and Programmer*

*Life's Live Poetry*

-- *Notice *--
The validity of none of any of the text in this mail is guaranteed. The
information in this message is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this message by anyone
else is unauthorized. If you are not the intended recipient, any
disclosure, copying or distribution of the message, or any action taken by
you in reliance on it, is prohibited and may be unlawful. If you have
received this message in error, please delete it and contact the sender
immediately. Thank you.

Search Discussions

  • Johannes Schlüter at Nov 25, 2010 at 3:59 pm

    On Thu, 2010-11-25 at 16:44 +0100, Kenan Sulayman wrote:
    So - is there a way to dynamically extend a class (not the
    traditionally
    "get-the-class,-clone-the-class-and-add-sugar"-way) ?
    After reading this three times i interpret it like "I want to add stuff
    to the instance" and no that is not possible (runkit doesn't count) by
    the definition of our class-based OO model.
    --
    that should be "-- " mind the space.
    -- *Notice *--
    The validity of none of any of the text in this mail is guaranteed.
    The
    information in this message is confidential and may be legally
    privileged.
    It is intended solely for the addressee. Access to this message by
    anyone
    else is unauthorized. If you are not the intended recipient, any
    disclosure, copying or distribution of the message, or any action
    taken by
    [..]

    sorry. I just broke the rule as the addressee is the list, not me.
    Please get rid of this when sending the next mail to this list.

    johannes
  • Kenan Sulayman at Nov 25, 2010 at 4:08 pm
    Okay. :/

    After all, thank you for the interjection of "Runkit" ^^
    I think, I'll give it a try.. :)

    Thanks - and uhh - my signature really looks ugly in the mailing-list.
    Thanks for letting me know ;)

    Cheers,
    --
    (c) *Kenan Sulayman*
    *Freelance Designer and Programmer*

    *Life's Live Poetry*

    2010/11/25 Johannes Schlüter <johannes@schlueters.de>
    class-based OO

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedNov 25, '10 at 3:44p
activeNov 25, '10 at 4:08p
posts3
users2
websitephp.net

People

Translate

site design / logo © 2022 Grokbase