Created
February 11, 2012 23:04
-
-
Save zircote/1804895 to your computer and use it in GitHub Desktop.
Zend_Rest_Route
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // 205 | |
| // Map PUT and POST to actual create/update actions | |
| // based on parameter count (posting to resource or collection) | |
| switch( $values[$this->_actionKey] ){ | |
| case 'post': | |
| if ($pathElementCount > 0) { | |
| $values[$this->_actionKey] = 'put'; | |
| } else { | |
| $values[$this->_actionKey] = 'post'; | |
| } | |
| break; | |
| case 'put': | |
| $values[$this->_actionKey] = 'put'; | |
| break; | |
| } | |
| //220 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment