/** * Set or get if we are currently running REST * @static * @param null $set * @param string $baseUrl * @return bool */ public static function currentContextIsRestAPI($restBase = '') { if (!empty($restBase)) { self::$restAPIContext = $restBase; return $restBase; } else { return self::$restAPIContext; } }