Retrieving the sfContext from within your model is bad coding. How to test your model then (when in CLI there is no sfContext available).
You have to separate concerns : the controller is here to prepare data to the model and view. Then you'll be able to test your models separatly, giving them what they do need from within your tests (so tests will be acting as controllers, in feeding the models with data according to scenariis). Cheers, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Thu, Oct 21, 2010 at 12:26 AM, hribo <hribo...@gmail.com> wrote: > hello, thank you for all your posts. i am still new to OOP and MVC. > i have already solved my problem. > > but one thing i have found out that it actually is possible to > retrieve post parameter from model with using this syntax : > sfContext::getInstance()->getRequest()- >>getParameter('lender_user_id'); > > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en