commands = new AIOWPSecurity_Commands(); } /** * Magic method to pass on the command to AIOWPSecurity_Commands * * @param string $name - command name * @param array $arguments - command parameters * * @return array - response */ public function __call($name, $arguments) { if (!is_callable(array($this->commands, $name))) { return $this->_generic_error_response('aios_no_such_command', $name); } $result = call_user_func_array(array($this->commands, $name), $arguments); if (is_wp_error($result)) { return $this->_generic_error_response($result->get_error_code(), $result->get_error_data()); } else { return $this->_response($result); } } }