Hi there!

I'm working with the following code:

<?php

abstract class Foo{

protected $a;
protected $b;
protected $c;

 function __construct($arg){
 $this->a = $arg;
 }

 function __call($function, $args){
 $this->b = $function;
 $this->c = $args;
 $this->doWhatever();
 }

 private doWhatever(){
 }
}


class Boo extends Foo{

protected $e;

public function __construct(){
 parent::__construct('Blah');
 }

public function drive(){
  $e = 'testing';
  parent::drive($e);
 }
}


$br = new Boo();
$br->drive();



But I get a Fatal error: Call to undefined method Foo::drive()

The magic fuction __call don't catch the "drive()". Why not?

I need another idea for this problem and avoid edit the abstract class.

Sorry about the english.

Thanks for any help

Reply via email to