Skip to content

Commit fb51dcd

Browse files
4.18
1 parent 75ce1c6 commit fb51dcd

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

lib/BladeOne.php

+17-1
Original file line numberDiff line numberDiff line change
@@ -2458,7 +2458,7 @@ public function getBaseUrl(): string
24582458
* @param string $baseUrl Example http://www.web.com/folder https://www.web.com/folder/anotherfolder
24592459
* @return BladeOne
24602460
*/
2461-
public function setBaseUrl($baseUrl): BladeOne
2461+
public function setBaseUrl(string $baseUrl): BladeOne
24622462
{
24632463
$this->baseUrl = \rtrim($baseUrl, '/'); // base with the url trimmed
24642464
$this->baseDomain = @parse_url($this->baseUrl)['host'];
@@ -2478,6 +2478,22 @@ public function setBaseUrl($baseUrl): BladeOne
24782478
return $this;
24792479
}
24802480

2481+
/**
2482+
* It sets a CDN Url used by @assetcdn("someresource.jpg")<br>
2483+
* **Example:**
2484+
* ```
2485+
* $this->setCDNUrl('http://domain.dom/myblog');
2486+
* ```
2487+
*
2488+
* @param string $cdnurl the full path url without the trailing slash
2489+
* @return $this
2490+
*/
2491+
public function setCDNUrl(string $cdnurl): BladeOne
2492+
{
2493+
$this->cdnUrl = $cdnurl;
2494+
return $this;
2495+
}
2496+
24812497
/**
24822498
* It gets the full current url calculated with the information sends by the user.<br>
24832499
* **Note:** If we set baseurl, then it always uses the baseurl as domain (it's safe).<br>

0 commit comments

Comments
 (0)