title: how to read cookie in helper class in cakephp
body: <p>I am using cookie helper in cakephp and i am using following code for accessing the value of cookie variable</p>
  
  <pre><code>$this-&gt;Cookie-&gt;write('testvar','testvalue');
  </code></pre>
  
  <p>I have made a helper class when i try to get the value of this cookie variable vid a following </p>
  
  <pre><code>$this-&gt;Cookie-&gt;read('testvar');
  </code></pre>
  
  <p>It produces an error(Call to a member function read() on a non-object).
  Is there any other method by which i can access the cookie variable in helper.Although i can try the $_Cookie (server variable).</p>