Re: Raising errors inside a constructor

From: Date: Tue, 17 Aug 2004 14:29:25 +0000
Subject: Re: Raising errors inside a constructor
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-32745@lists.php.net to get a copy of this message
Olivier Guilyardi wrote:
Joshua Eichorn wrote: Generally using base classes is a bad idea (well in php, something like java is a bit different), especially to get rid of static calls which are very readable just a little different if you've never seen them before. I've seen and used static calls. As less as possible though, since that does not follow the OO paradigm. Java ? Humm... The new features of php5 really remind me of Java (or some other real OO language). Is your above statement still true with php5 ? -- og php5 might have OO features but there is still quite a bit of overhead in parsing to large object trees. Plus even in java the base class limits your flexability a lot, especially when intergrating classes from other sources. I don't think I would sacrifice flexibility for OO purity but if your going that route at least make the error handling stuff an interface that the base class implements otherwise you end up having to hack 3rd party code instead of just extending it to make it fit.
-josh

« previous php.pear.dev (#32745) next »