Add In The Ability To Do Rack-Like Middleware?
Posted 08 July 2013 - 10:18 AM
More info about Rack here:
Some thoughts on implementing a similar setup in Symfony 2:
Seems like we've got the rudiments of handling this type of setup using before/afterRequest events in Yii, but that the Rack setup is more developed (and advanced) and allows for injecting an event handler (in Yii parlance) at a certain point in the stack.
Github recently used an addition to their Rack middleware as a way to implement additional security checks on cookies. Seems like the real value of an addition like this would be for retrofitting an application with additional features once it'd already grown fairly large.
Interested any your thoughts ...
Posted 09 July 2013 - 04:26 AM
Can you explain what you expect from this or how it would look like?
Posted 29 August 2013 - 06:48 PM
However, I think the one thing I like about Rack that we're currently missing in Yii is the ability to specify where in the request stack an app behavior is loaded. I'm working on a project now that uses multiple app behaviors and (although I don't have this problem at the moment) it might be nice to be able to specify which behavior gets loaded first.
Does that already happen just by the location in the behaviors array for the app? Haven't actually checked ...
Thinking about it further, this may be a solution in search of a problem ;-)
Posted 31 August 2013 - 09:50 AM
Yes that is exactly how it works, they are loaded in the order they are defined.