Of course:

  function delete($id = null)
  {
        $this->setAction('manage_employees', $deleted_employee);  
  }

  function manage_employees($deleted_employee)
  {
  }

You don't need to use func_get_args

-MI

---------------------------------------------------------------------------

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-----Mensaje original-----
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de [EMAIL PROTECTED]
Enviado el: Jueves, 19 de Abril de 2007 03:20 p.m.
Para: Cake PHP
Asunto: setAction - reading the parameters


Hi all,

When using setAction to redirect to another controller action, the
parameters are passed such that they can be retrieved via
<code>func_get_args()</code>.

Looks like this:

<code>
  // the delete action should be redirected to the manage action
  function delete($id = null)
  {
        $this->setAction('manage_employees', $deleted_employee);
        //$this->redirect('employees/manage_employees');
  }

  // the parameter is read via func_get_args()
  function manage_employees()
  {
        $args = func_get_args();
        $delete_employee = $args[0];
   }
</code>

Is there a better way to access the passed parameter in the action
manage_employees above - other than $args[0]?

Thanks,
Quang



__________ Información de NOD32, revisión 2205 (20070419) __________

Este mensaje ha sido analizado con  NOD32 antivirus system
http://www.nod32.com



--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to