public function xroute($data) { if (is_array($data)) { foreach ($data as $namespace => $function) { if ($result = xNameSpaceHolder::call('module.' . $namespace, key($function), current($function))) { if (($instance = xNameSpaceHolder::getLastInstance()) && ($instance->result or $instance->lct)) { $this->result = $instance->result; $this->lct = $instance->lct; } $this->message = self::$stackMessage; $this->error = self::$stackError; } elseif ($result === null) { self::pushError($namespace . '::' . key($function) . ' method not found'); } } } }