/** * The Main Page * @return string */ public function indexAction() { $template = $this->twig->loadTemplate('public/index.twig'); // Creates a new NativeInvoker $nativeInvoker = new NativeInvoker($this->app->scriptsPath); $this->data['hardwareInfo'] = $nativeInvoker->getHardwareInformation(); $this->data['networkInfo'] = $nativeInvoker->getNetworkInformation(); $this->data['loadInfo'] = $nativeInvoker->getLoadInformation(); $this->data['memoryInfo'] = $nativeInvoker->getMemoryInformation(); $this->data['storageInfo'] = $nativeInvoker->getStorageInformation(); // Renders the template return $template->render($this->data); }
public function getAllInformation() { try { // Creates a new NativeInvoker $nativeInvoker = new NativeInvoker($this->app->scriptsPath); $this->data['hardwareInfo'] = $nativeInvoker->getHardwareInformation(); $this->data['networkInfo'] = $nativeInvoker->getNetworkInformation(); $this->data['loadInfo'] = $nativeInvoker->getLoadInformation(); $this->data['memoryInfo'] = $nativeInvoker->getMemoryInformation(); $this->data['storageInfo'] = $nativeInvoker->getStorageInformation(); return $this->render($this->data); } catch (\Exception $ex) { return $this->renderError(); } }