/** * Apply options. * * @since 1.4.0 */ private function apply_options() { // Bail out if not connected yet to PHP Console. if (!$this->connector instanceof PhpConsole\Connector) { return; } // Apply 'register' option to PHP Console... if (true === $this->options['register'] && !class_exists('PC', false)) { // ...only if PC not registered yet. try { PhpConsole\Helper::register(); } catch (\Exception $e) { $this->print_notice_exception($e); } } // Apply 'stack' option to PHP Console. if (true === $this->options['stack']) { $this->connector->getDebugDispatcher()->detectTraceAndSource = true; } // Apply 'short' option to PHP Console. if (true === $this->options['short']) { try { $this->connector->setSourcesBasePath($_SERVER['DOCUMENT_ROOT']); } catch (\Exception $e) { $this->print_notice_exception($e); } } }