Re: Beginner Tutorials for using CLASSES in PHP4
| From: | Robert Cummings | Date: | Tue, 09 Oct 2007 17:29:07 +0000 |
| Subject: | Re: Beginner Tutorials for using CLASSES in PHP4 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-262986@lists.php.net to get a copy of this message | ||
On Tue, 2007-10-09 at 13:15 -0400, Nathan Nobbe wrote:
> On 10/9/07, Robert Cummings <robert@interjinn.com> wrote:
> >
> > Why would I use an interface? :)
>
>
> because inheritance is not always optimal.
>
> What's the problem that's outlined? I'm too lazy to go and look :|
>
>
> /**
> * CI_BASE - For PHP 4
> *
> * This file is used only when CodeIgniter is being run under PHP 4.
> *
> * In order to allow CI to work under PHP 4 we had to make the Loader class
> * the parent of the Controller Base class. It's the only way we can
> * enable functions like $this->load->library('email') to instantiate
> * classes that can then be used within controllers as $this->email->send()
> *
> * PHP 4 also has trouble referencing the CI super object within application
> * constructors since objects do not exist until the class is fully
> * instantiated. Basically PHP 4 sucks...
> *
> * Since PHP 5 doesn't suffer from this problem so we load one of
> * two files based on the version of PHP being run.
> *
> * @package CodeIgniter
> * @subpackage codeigniter
> * @category front-controller
> * @author Rick Ellis
> * @link http://www.codeigniter.com/user_guide/
> */
Having read the comment it sounds like they have a solution in place.
Cheers,
Rob.
--
...........................................................
SwarmBuy.com - http://www.swarmbuy.com
Leveraging the buying power of the masses!
...........................................................