Kohana 3 - Constructor

Posted by pigfox on Stack Overflow See other posts from Stack Overflow or by pigfox
Published on 2010-05-29T18:57:21Z Indexed on 2010/05/29 19:02 UTC
Read the original article Hit count: 439

I attempted to use public function __construct(){} but got the error ErrorException [ Strict ]: Creating default object from empty value.

The reason behind this is that I use a controller that is protected for logged in users only, I don't want to have to call $this->protect(); from every action in the controller.

Hence my attempt to use a constructor that calls $this->protect();

© Stack Overflow or respective owner

Related posts about php

Related posts about authentication