Hi,
From documentation in Symfony book, chapter 6:
<quote>
The Front Controller's Job in Detail
.
.
7. Activate filters (for instance, if the request needs authentication).
8. Execute the filters, first pass.
9. Execute the action and render the view.
10. Execute the filters, second pass.
11. Output the response.
</quote>
From documentation, it is clear that Filter chain makes multiple
passes. In my case it is making 3 passes. I want my filter to get
executed exactly once every page request. No matter how many passes
filter chain makes before it is rendered.
If I use code like this:
class myFilter extends sfFilter
{
public function execute($filterChain)
{
// Execute this filter only once
if ($this->isFirstCall())
{
//some code here
}
// Execute next filter
$filterChain->execute();
}
}
my filter gets executed 3 times as filter chain have to make 3 passes.
How can make sure that my filter gets executed exactly once, that too in
first pass itself?
--
Best Regards,
Sameer N. Ingole
http://weblogic.noroot.org/gallery2/
--
Better to light one candle than to curse the darkness.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" 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/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---