CakePHP 2.0 alternative for Configure::getInstance?
-
27-10-2019 - |
Question
I'm currently trying to migrate from CakePHP 1.3 to 2.0. Do you know an alternative for Configure::getInstance() that works in CakePHP 2.0?
Solution
cake 2.x uses AclExtras as explaind in http://book.cakephp.org/2.0/en/tutorials-and-examples/simple-acl-controlled-application/part-two.html to set this up.
OTHER TIPS
I don't know why you used Configure::getInstance()
in CakePHP 1.3, but all methods of the Configure
class in CakePHP 2.0 are static, so you can call them with Configure::<METHOD_NAME>
.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow