Welcome Guest, Not a member yet? Register   Sign In
How to extend the Controller core class
#8

Ignore the $params part. That reply was 2.5 years old and things have changed. CodeIgniter's controller doesn't use the constructor anymore.

To explain that part, though, using the three dots converts all arguments passed to the method into an array, $param. Then, when calling the parent method, it takes that array and converts it back to the original arguments. It's basically a lazy way of including all of the arguments without all of the typing. Smile It is a new feature added in one of the PHP 5.6. My Google-fu is failing and I can't find it in the manual, but I did find the rfc for it.
Reply


Messages In This Thread
How to extend the Controller core class - by Edel - 07-22-2017, 03:35 PM
RE: How to extend the Controller core class - by kilishan - 04-03-2020, 11:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB