I am trying to work on optimizing one of my apps to make it cleaner and
faster. In this I am thinking about doing action aliasing like
this...will this work?

<!-- BELOW REPRESENTS A CONTROLLER -->

//--START

var $beforeRender = array('_prepForOut');
var $Out = array();  //This holds all values coolected to be applied
with $this->set();
var $aliases = array(
                                'join'   => 'Join',
                'verify' => 'Verify Your Account',
                'remind' => 'Forgot My Password',
                'login'  => 'Login',
                logout' => 'Logout');

---------- (...) --------------

function _prepForOut()
{
    $this->Out['ptitle'] = $this->aliases[$this->action];
    $this->_setAll();
}

function _setAll()
{
        foreach($this->out AS $id => $data)
        {
                $this->set($id,$data);
        }
}

//---- END


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to