Automating “Implemented methods” for a web based API
In my leedsphp talk last week I mentioned making a developer (and consumers) life easier by automatically implementing the allow methods functionality that your API may expose (e.g. you call PUT on a URL that only allows GET or POST). I did have an example slide there showing how to implement but I thought I’d posted a bare bones controller here that shows how it works. abstract class ApiController extends Zend_Rest_Controller { /** * Default head action. * * @internal * @return void */ public function headAction() { ob_start(); $this->getAction(); ob_get_clean(); } /** * Default get action. * * @internal … Continue reading