Created
December 16, 2011 07:21
-
-
Save mrpollo/1484948 to your computer and use it in GitHub Desktop.
Extending Zend_Rest_Server to use namespaces
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 | |
| class EventManager_Framework_Rest extends Zend_Rest_Server | |
| { | |
| /** | |
| * Implement Zend_Server_Interface::setClass() | |
| * | |
| * @param string $classname Class name | |
| * @param string $namespace Class namespace (unused) | |
| * @param array $argv An array of Constructor Arguments | |
| */ | |
| public function setClass($classname, $namespace = '', $argv = array()) | |
| { | |
| $this->_args = $argv; | |
| foreach ($this->_reflection->reflectClass($classname, $argv)->getMethods() as $method) { | |
| $this->_functions[$namespace.".".$method->getName()] = $method; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment