title: How to define global SESSION in CakePHP's AppController?
body: <p>I am using CakePHP 3.3</p>
  
  <p>My Controller:</p>
  
  <pre><code>class ConfigsController extends AppController
  {
  
      public $session;
  
      public function initialize()
      {
          parent::initialize();
          $this-&gt;loadComponent('CheckAuthUserSession');
  
          $this-&gt;session = $this-&gt;request-&gt;session();
      }
  }
  </code></pre>
  
  <p>I have this line below in every controller of my project</p>
  
  <pre><code>$this-&gt;session = $this-&gt;request-&gt;session();
  </code></pre>
  
  <p>Is there a way to define this in AppController's initialize() and then I can access it by <code>parent::session</code>? Or anywhere else which makes it global.</p>