Components
SecurityComponent
The various requireXX methods like requireGet and
requirePost now accept a single array as their
argument as well as a collection of string names.
$this->Security->requirePost(array('edit', 'update'));
$this->Security->requirePost(array('edit', 'update'));
Component settings
Component settings for all core components can now be set from
the $components array. Much like behaviors, you can
declare settings for components when you declare the component.
var $components = array(
'Cookie' => array(
'name' => 'MyCookie'
),
'Auth' => array(
'userModel' => 'MyUser',
'loginAction' => array('controller' => 'users', 'action' => 'login')
)
);
var $components = array('Cookie' => array('name' => 'MyCookie'),'Auth' => array('userModel' => 'MyUser','loginAction' => array('controller' => 'users', 'action' => 'login')));
This should reduce clutter in your Controller's
beforeFilter() methods.
EmailComponent
- You can now retrieve the rendered contents of sent Email
messages, by reading
$this->Email->htmlMessageand$this->Email->textMessage. These properties will contain the rendered email content matching their name. - Many of EmailComponent's private methods have been made protected for easier extension.
- EmailComponent::$to can now be an array. Allowing easier setting of multiple recipients, and consistency with other properties.
EmailComponent::$messageIdhas been added, it allows control over the Message-ID header for email messages.


























