• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Redux Auth - is it dead?

#26
[eluser]Queops[/eluser]
[quote author="joytopia" date="1265217276"]Thank you, 2think,
now I got it running. At the first glance it looks very well.

One question:

normally a controller starts like this:

Code:
class Test extends Controller {

    function Test()
    {
        parent::Controller();

but the controller in Ion Auth starts like that:

Code:
class Auth extends Controller {

    function __construct()
    {
        parent::__construct();

What is the difference, and how do I have to deal with it?

Thanks and best regards,
Bernd[/quote]

It's the same thing.
PHP 5 uses the construct function as __construct() where you used to have the class name. So if no __construct() is found PHP will search for ClassName() instead.
I read this in a recent PHP 5.3 book and they recommend you to use __construct() and __destruct(). (And to be honest it looks better this way! it's easier to see them)

For more information:
http://php.net/manual/en/language.oop5.decon.php


Messages In This Thread
Redux Auth - is it dead? - by El Forum - 01-27-2010, 04:20 AM
Redux Auth - is it dead? - by El Forum - 01-27-2010, 05:21 AM
Redux Auth - is it dead? - by El Forum - 01-27-2010, 08:45 AM
Redux Auth - is it dead? - by El Forum - 01-27-2010, 08:59 AM
Redux Auth - is it dead? - by El Forum - 01-29-2010, 10:19 AM
Redux Auth - is it dead? - by El Forum - 01-29-2010, 10:21 AM
Redux Auth - is it dead? - by El Forum - 01-29-2010, 10:26 AM
Redux Auth - is it dead? - by El Forum - 01-29-2010, 10:27 AM
Redux Auth - is it dead? - by El Forum - 01-29-2010, 10:37 AM
Redux Auth - is it dead? - by El Forum - 01-30-2010, 07:23 AM
Redux Auth - is it dead? - by El Forum - 01-31-2010, 05:40 PM
Redux Auth - is it dead? - by El Forum - 02-01-2010, 08:34 AM
Redux Auth - is it dead? - by El Forum - 02-02-2010, 02:09 AM
Redux Auth - is it dead? - by El Forum - 02-02-2010, 01:20 PM
Redux Auth - is it dead? - by El Forum - 02-03-2010, 05:14 AM
Redux Auth - is it dead? - by El Forum - 02-03-2010, 05:37 AM
Redux Auth - is it dead? - by El Forum - 02-03-2010, 12:23 PM
Redux Auth - is it dead? - by El Forum - 02-03-2010, 04:18 PM
Redux Auth - is it dead? - by El Forum - 02-03-2010, 04:24 PM
Redux Auth - is it dead? - by El Forum - 02-04-2010, 03:59 AM
Redux Auth - is it dead? - by El Forum - 02-04-2010, 11:10 AM
Redux Auth - is it dead? - by El Forum - 02-05-2010, 04:12 AM
Redux Auth - is it dead? - by El Forum - 02-05-2010, 09:16 PM
Redux Auth - is it dead? - by El Forum - 02-06-2010, 05:13 AM
Redux Auth - is it dead? - by El Forum - 02-07-2010, 10:19 AM
Redux Auth - is it dead? - by El Forum - 02-07-2010, 07:55 PM
Redux Auth - is it dead? - by El Forum - 02-08-2010, 03:40 AM
Redux Auth - is it dead? - by El Forum - 02-08-2010, 02:31 PM
Redux Auth - is it dead? - by El Forum - 02-08-2010, 02:38 PM
Redux Auth - is it dead? - by El Forum - 02-08-2010, 10:48 PM
Redux Auth - is it dead? - by El Forum - 02-08-2010, 11:54 PM
Redux Auth - is it dead? - by El Forum - 02-09-2010, 12:36 AM
Redux Auth - is it dead? - by El Forum - 02-09-2010, 08:04 AM
Redux Auth - is it dead? - by El Forum - 02-12-2010, 04:04 PM
Redux Auth - is it dead? - by El Forum - 02-12-2010, 04:29 PM
Redux Auth - is it dead? - by El Forum - 02-12-2010, 05:18 PM
Redux Auth - is it dead? - by El Forum - 02-13-2010, 05:21 AM
Redux Auth - is it dead? - by El Forum - 02-17-2010, 04:48 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.