/** * Load function definitions * * @param array|Zend_Server_Definition $definition * @return void */ public function loadFunctions($definition) { if (!is_array($definition) && !$definition instanceof Zend_Server_Definition) { throw new Zend_Json_Server_Exception('Invalid definition provided to loadFunctions()'); } foreach ($definition as $key => $method) { $this->_table->addMethod($method, $key); $this->_addMethodServiceMap($method); } }
/** * Load function definitions * * @param array|Zend_Server_Definition $definition * @return void */ public function loadFunctions($definition) { if (!is_array($definition) && !$definition instanceof Zend_Server_Definition) { require_once PHP_LIBRARY_PATH . 'Zend/Json/Server/Exception.php'; throw new Zend_Json_Server_Exception('Invalid definition provided to loadFunctions()'); } foreach ($definition as $key => $method) { $this->_table->addMethod($method, $key); $this->_addMethodServiceMap($method); } }