CodeIgniter Forums

Full Version: Scaffolding in constructor. PHP 5
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]ak-83[/eluser]
Hi every1!
Got a noob question.. It is said in CI documentation one can define scaffolding right in controller constructor and the get it with "controller/secret-word" request. If i code my constructor in PHP4 way -> it works well. But when I use PHP5 style -> it fails, showing 404 error. What's the deal?
The code that works below...
Code:
class Blog extends Controller {
        function Blog(){
            parent::Controller();
            $this->load->database('default');
            $this->load->scaffolding('posts');
        }
// IT WORKS!

Not work..

Code:
class Blog extends Controller {
        function __construct(){
            parent::Controller();
            $this->load->database('default');
            $this->load->scaffolding('posts');
        }
//DON'T WORK!

El Forum

[eluser]ak-83[/eluser]
And, thanks in forward :-)

El Forum

[eluser]├╝berfuzz[/eluser]
Quote:Scaffolding has been deprecated from CodeIgniter as of 1.6.0.

El Forum

[eluser]├╝berfuzz[/eluser]
And welcome to the forum. :-)

El Forum

[eluser]ak-83[/eluser]
Thanks 4 fast reply!
I've read translated docs, and that statement was absent there.
So, it was a quite handy feature.. Is there any replacements for sacaffolding? (except phpMyAdmin :-D)