I'm running several cronjobs as CakePHP shells and I need to generate certain documents there. Some of them are HTMLs that are going to be converted to PDFs, some of them are email with HTML content. I have templates/views for these and I'm able to render them via Controller. How can I render them in Shell?
Currently I'm using str_replace() to replace certain tokens with the strings I need, but that is dirty and I need more template-like functionality like loops and conditions.
In Smarty there is Smarty->fetch(). In CodeIgniter there is $this->load->view(). How is it done in CakePHP?