* Build the ProcessWire configuration * */ $config = ProcessWireBootConfig(); /* * Load and execute ProcessWire * */ try { /* * Bootstrap ProcessWire's core and make the API available with $wire or wire() * */ $wire = new ProcessWire($config); $process = $wire->modules->get('ProcessPageView'); $wire->wire('process', $process); echo $process->execute($internal); $internal ? $process->finished() : extract($wire->wire('all')->getArray()); } catch (Exception $e) { /* * Formulate error message and send to the error handler * */ if ($process) { $process->failed($e); } $wire ? $wire->trackException($e) : $config->trackException($e); $errorMessage = "Exception: " . $e->getMessage() . " (in " . $e->getFile() . " line " . $e->getLine() . ")"; if ($config->debug || $wire && $wire->user && $wire->user->isSuperuser()) { $errorMessage .= "\n\n" . $e->getTraceAsString(); }
* Build the ProcessWire configuration * */ $config = ProcessWireBootConfig(); /* * Load and execute ProcessWire * */ try { /* * Bootstrap ProcessWire's core and make the API available with $wire or wire() * */ $wire = new ProcessWire($config); $process = $wire->modules->get('ProcessPageView'); $wire->wire('process', $process); echo $process->execute($internal); if ($internal) { $process->finished(); } } catch (Exception $e) { /* * Formulate error message and send to the error handler * */ if ($process) { $process->failed($e); } $errorMessage = "Exception: " . $e->getMessage() . " (in " . $e->getFile() . " line " . $e->getLine() . ")"; if ($config->debug || $wire && $wire->user && $wire->user->isSuperuser()) { $errorMessage .= "\n\n" . $e->getTraceAsString();