mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2025-12-22 15:50:15 -05:00
26 lines
558 B
PHP
26 lines
558 B
PHP
<?php
|
|
|
|
namespace Icinga\Module\Businessprocess\Web;
|
|
|
|
use Icinga\Exception\ProgrammingError;
|
|
use Icinga\Web\Request;
|
|
|
|
class FakeRequest extends Request
|
|
{
|
|
/** @var string */
|
|
private static $baseUrl;
|
|
|
|
public static function setConfiguredBaseUrl($url)
|
|
{
|
|
self::$baseUrl = $url;
|
|
}
|
|
|
|
public function getBaseUrl($raw = false)
|
|
{
|
|
if (self::$baseUrl === null) {
|
|
throw new ProgrammingError('Cannot determine base URL on CLI if not configured');
|
|
} else {
|
|
return self::$baseUrl;
|
|
}
|
|
}
|
|
}
|