I’m interested in using the mark as read method for emails and in-app notifications as specified here
I’m using Symfony 1.4 and I can’t find anything within sfContext or sfWebRequest that can be used to detect if the connection has been terminated. Is there anyway to do this within the Symfony framework?
Would I be able to use the PHP functions connection_status() or connection_aborted()?
In a typical PHP script, the script execution will stop at the next tickable event after the user terminates a connection.
Because of this, you shouldn’t need to really do anything to get this to work (unless you have changed this setting in your php.ini) or someone has set the
ignore_user_abortflag.But, if you want to be safe, you could do the following: