rendered paste body protected function pluginInternal() { /** * Process an Internal Plugin Action */ if (!isset($this->json->pclass) || !isset($this->json->dn) || !isset($this->json->template)) { echo '<div class="pgnotice">Missing Arguments in Call. '; echo 'Check the Plugin Documentation.</div>'; return; exit(); } Ecl_Log::DEBUG("Plugin Internal Action Called"); Ecl_Log::DEBUG("Plugin Class: " . $this->json->pclass); Ecl_Log::DEBUG("Operate DN: " . $this->json->dn); Ecl_Log::DEBUG("Template: " . $this->json->template); try { /** * Internal Plugin Action Processing */ $ds = $this->_do_user_bind(); $this->view->obj = new Ecl_LdapObject($ds, $this->json->dn); $this->view->obj = $this->view->obj->getObject(); $this->view->plugin = new $this->json->pclass($this->view->obj); if (isset($this->json->paction)) { /** * A plugin action has been requested. */ if (isset($this->json->pactargs)) { $args = explode(",", $this->json->pactargs); if (empty($args)) $args = ''; } else $args = ''; $methodVariable = array($this->view->plugin, $this->json->paction); if (method_exists($this->view->plugin, $this->json->paction) && is_callable($methodVariable, true, $callable_name)) { $trans = call_user_func_array(array($this->view->plugin, $this->json->paction), $args); // process //$trans->process(); } else { throw new Ecl_Exception("Requested Action not defined"); } } /** * Plugin initialized -- render plugin hander template * within the directory controller's base view. */ $this->view->overwriteTemplate = 1; $this->view->template = $this->json->template; $this->view->jsonSave = $this->json; $this->render('pluginhandler'); } catch (Exception $e) { /** * For now we simply echo the Exception back. */ echo $e->getmessage(); } }