on (missing class method) call class method X

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • f3l

    #1

    on (missing class method) call class method X

    I want to use non existing methods of a class:

    class x{
    function y(){

    }
    //more stuff
    }


    and do this:

    $x1=new x();

    $x1->doesnt_exist() ;

    but instead of a fatal error, I want to run y(), I would like a way to
    redirect all these errors, to y(), and have y() act depending on the
    method name, etc.

    is that possible?

  • ZeldorBlat

    #2
    Re: on (missing class method) call class method X


    f3l wrote:
    I want to use non existing methods of a class:
    >
    class x{
    function y(){
    >
    }
    //more stuff
    }
    >
    >
    and do this:
    >
    $x1=new x();
    >
    $x1->doesnt_exist() ;
    >
    but instead of a fatal error, I want to run y(), I would like a way to
    redirect all these errors, to y(), and have y() act depending on the
    method name, etc.
    >
    is that possible?
    Sure. Check this out:
    <http://www.php.net/manual/en/language.oop5.o verloading.php# language.oop5.o verloading.meth ods>

    Comment

    Working...