title: CakePHP: Call controller::redirect from component
body: <p>I am trying to write a simple CakePHP component that will check a php session variable and redirect to a specific location if it is not set. This function is going to be used across multiple controllers and I just want to have the code for it one place (DRY and all).</p>
  
  <p>The problem I am running into is that cake does not make <code>Controller</code> functions accessible to components so I cannot call <code>$this-&gt;redirect([routing array])</code>. </p>
  
  <p>Is there a way around this? I would prefer not to add a return statement to the function that I then have to check in the controller, as that is all the function already does(a 1 line if statement) and seems like an unnecessary layer of abstraction. I am about to put the function in a seperate file outside of cake and just add  <code>include</code> into all of my controllers that need this function as a hacky way around this.</p>