If you’re working in a place other than a controller, view, helper, or component – such as an event listener, custom lib class, etc. – and need to access the CakeRequest object (which is available as $this->request in controllers/views/helpers), then use Router to get it:
$request = Router::getRequest();
About Jamie Nay
Jamie is a professional web developer (specializing in PHP and Javascript) living in Victoria, BC, Canada. He has two degrees in Classics, a field completely unrelated to what he's doing now. Jamie plays hockey, soccer, and the bass guitar, among others. He wonders if this third-person writing style has anyone fooled.
No Comments Yet - be the First!