-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add getFilename() to Zend\Cache\Pattern\CaptureCache #3747
Conversation
…ace. Also made set() trigger a set.post event which makes it possible for the user to know what the saved file name is.
@poisa I don't think this is the right way to get the internal filename. I think a resolver class+interface would be a better idea. |
@marc-mabe I'm not exactly sure what you mean but if you can show me an example I'll try to whip it up. I first thought of adding a property to the class that contained the file name but since this function is run within the scope of a ob_start(), I didn't know how to get a reference to the class to set the property. See this:
|
@poisa OK a resolver class + interface is a little bit too much. An alternative would be to add a public method |
…reInterface. Also made set() trigger a set.post event which makes it possible for the user to know what the saved file name is." This reverts commit 9d415ea.
@marc-mabe I tried your suggestion and it looks much simpler and cleaner. |
@poisa Please return the full filename incl. |
@marc-mabe as it turns out |
@poisa Because it's not sure that the test will be run in CLI and because a failed test will return the test function before you reset the value please use setUp()
|
…bal on unit testsBuffered $_SERVER superglobal on unit testsBuffered $_SERVER superglobal on unit testsBuffered $_SERVER superglobal on unit testsBuffered $_SERVER superglobal on unit testsBuffered $_SERVER superglobal on unit testsBuffered $_SERVER superglobal on unit tests
@marc-mabe you are right. I didn't even consider that scenario. I've made the changes you requested. I have no idea what's up with the commit message on this one... maybe I screwed something up while typing in vim. Git won't even allow me to ammend... Sorry about that! |
@poisa looks good to me - please update title of PR and if nobody else has comments please rebase and it could be merged. @Maks3w @weierophinney ping |
I've updated the title of the pull request. I don't know how to rebase my branch with your own so I'm going to need a little help there! |
As this adds to the API, I'm scheduling for 2.2.0 (end of April). |
Merged to develop. |
This is particularly useful for pushing the saved file to a CDN or a message queue.