Currently Browsing: CakePHP
Oct 1, 2009
Force download a custom view using MediaView
Just some quick hint: Let’s assume you generate a non-html file using a view, layout and custom extension (sql, xml, json, etc..) and you want to offer the displayed result as a download. – Generally you would need to force-download the file, probably using MediaView. Problem is that it isn’t actually a real file for MediaView to work with. Here’s a quick workaround to that, using... read more
Jul 19, 2009
Environment: Support methods in param matching
Some of you probably remember the fine Environment Class developed by Rafael Bandeira. I still use and love it for handling dev, staging and production environments. And it’s super awesome that you may create a AppEnvironment class to tweak the config and param mapping. However, i found one thing missing and that’s support for arrays when matching the mapped params. For example: You have one... read more

