it worked when i called session component inside my class like this
class MessageComponent extends Object
{
var $components = array('Session');
function getMessage()
{
}
}
Hoping that this will help some others who having the same problem.
On Jul 19, 9:49
You have a couple ways to do so.
1) use the startup method, which gets passed the controller as its
first argument. Store a reference to it within the object.
2) App::import('Component', 'Session'); and then you should be able to
instantiate the session object and use it that way.
On Sat, Jul 1
any body please answer to this .
how can we use the Session helper inside component file ?
Thanks in advance
On Jul 18, 12:18 pm, web <[EMAIL PROTECTED]> wrote:
> Iam using cakephp1.2, and have created a custom component for
> messaging purpose . but amnotable to use $this->Session->read(
Iam using cakephp1.2, and have created a custom component for
messaging purpose . but am not able to use $this->Session->read() or
$this->Session->delete() inside my class.
These codes creates an error like this "Call to a member function on
a non-object ". So I have to use the conventional ph