Dc wrote:
> Hi -
>
> I am trying to extend a built in class, but cannot seem to get my
> subclass methods called.
>
> class movObj extends SWFMovie {
> function init() {
> echo("init");
> }
> }
>
> $m = new movObj();
> $m->init();
>
> Gives:::
> Fatal error: Call to undefined method SWFMovie::init() ...
>
> This method call i would have hoped would pass up to the baseclass.
>
> But if I add a constructor to my own subclass, the init method can be
> called. BUT i can now not call any of the SWFMovie methods. Like, it
> is not really extending the built in class, or there is no hierarchy.
>
> I messed with various versiosn of trying to call the super myself:
>
> parent::method
> $this->parent->method()
>
> without much success.
>
> Is this a limitation of phps classes? We cannot subclass built in types
> (perhaps they were built/not compatible with php5 object model)?
>
> thanks!
>
are you using php 4 or 5?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php