CakePHP, Email Model and Email Component. I've done something stupid
cakephp, components, email, model, php
Solution
You can just rename the EmailComponent:
/controllers/components/email_handler.php:
App::import('Component', 'Email');
class EmailHandlerComponent extends EmailComponent { }
Controller:
public $components = array('EmailHandler');
public function foo() {
$this->EmailHandler->...
}
Problem
I have a model called Emails, which I have build a lot of functionality for, however now I have come to actually send emails in the emails controller and have hit a wall. The email component clashes with the model, they are both referenced with $this->Email. My question is how can I rename the component (going back and changing the model would be a lot of work). P.S. I'm used to rails so I thought it would be called notifier.