ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
LSUrlBuilder Class Reference
+ Inheritance diagram for LSUrlBuilder:
+ Collaboration diagram for LSUrlBuilder:

Public Member Functions

 __construct (ILIAS\Data\URI $base_url)
 
 getURL (string $command, ?int $param=null)
 Get an URL for the provided command and params. More...
 
 getHref (string $command, ?int $param=null)
 
 getURL (string $command, ?int $param=null)
 Get an URL for the provided command and params. More...
 

Data Fields

const PARAM_LSO_COMMAND = 'lsocmd'
 
const PARAM_LSO_PARAMETER = 'lsov'
 

Protected Attributes

ILIAS Data URI $base_url
 

Detailed Description

Definition at line 23 of file LSUrlBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

LSUrlBuilder::__construct ( ILIAS\Data\URI  $base_url)

Definition at line 30 of file LSUrlBuilder.php.

31 {
32 $this->base_url = $base_url;
33 }
ILIAS Data URI $base_url

References $base_url.

Member Function Documentation

◆ getHref()

LSUrlBuilder::getHref ( string  $command,
?int  $param = null 
)

Definition at line 53 of file LSUrlBuilder.php.

53 : string
54 {
55 $url = $this->getURL($command, $param);
56 return $url->getBaseURI() . '?' . $url->getQuery();
57 }
getURL(string $command, ?int $param=null)
Get an URL for the provided command and params.
$url
Definition: shib_logout.php:68
$param
Definition: xapitoken.php:46

References $param, $url, and getURL().

+ Here is the call graph for this function:

◆ getURL()

LSUrlBuilder::getURL ( string  $command,
?int  $param = null 
)

Get an URL for the provided command and params.

Implements ILIAS\KioskMode\URLBuilder.

Definition at line 35 of file LSUrlBuilder.php.

36 {
37 $query = $this->base_url->getQuery();
38 if (!$query) {
39 $params = [];
40 } else {
41 parse_str($this->base_url->getQuery(), $params);
42 }
43
45 if (is_null($param)) {
46 unset($params[self::PARAM_LSO_PARAMETER]);
47 } else {
49 }
50 return $this->base_url->withQuery(http_build_query($params));
51 }
The scope of this class is split ilias-conform URI's into components.
Definition: URI.php:35
const PARAM_LSO_COMMAND
const PARAM_LSO_PARAMETER
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31

References $param, $params, PARAM_LSO_COMMAND, and PARAM_LSO_PARAMETER.

Referenced by getHref().

+ Here is the caller graph for this function:

Field Documentation

◆ $base_url

ILIAS Data URI LSUrlBuilder::$base_url
protected

Definition at line 28 of file LSUrlBuilder.php.

Referenced by __construct().

◆ PARAM_LSO_COMMAND

const LSUrlBuilder::PARAM_LSO_COMMAND = 'lsocmd'

Definition at line 25 of file LSUrlBuilder.php.

Referenced by getURL(), and LSUrlBuilderTest\testUrlConcatenation().

◆ PARAM_LSO_PARAMETER

const LSUrlBuilder::PARAM_LSO_PARAMETER = 'lsov'

Definition at line 26 of file LSUrlBuilder.php.

Referenced by getURL(), and LSUrlBuilderTest\testUrlConcatenation().


The documentation for this class was generated from the following file: