@@ -286,12 +286,12 @@ class to generate absolute URLs for their assets::
286
286
// ...
287
287
288
288
$urlPackage = new UrlPackage(
289
- 'http ://static.example.com/images/',
289
+ 'https ://static.example.com/images/',
290
290
new StaticVersionStrategy('v1')
291
291
);
292
292
293
293
echo $urlPackage->getUrl('/logo.png');
294
- // result: http ://static.example.com/images/logo.png?v1
294
+ // result: https ://static.example.com/images/logo.png?v1
295
295
296
296
You can also pass a schema-agnostic URL::
297
297
@@ -318,15 +318,15 @@ constructor::
318
318
// ...
319
319
320
320
$urls = [
321
- '//static1.example.com/images/',
322
- '//static2.example.com/images/',
321
+ 'https: //static1.example.com/images/',
322
+ 'https: //static2.example.com/images/',
323
323
];
324
324
$urlPackage = new UrlPackage($urls, new StaticVersionStrategy('v1'));
325
325
326
326
echo $urlPackage->getUrl('/logo.png');
327
- // result: http ://static1.example.com/images/logo.png?v1
327
+ // result: https ://static1.example.com/images/logo.png?v1
328
328
echo $urlPackage->getUrl('/icon.png');
329
- // result: http ://static2.example.com/images/icon.png?v1
329
+ // result: https ://static2.example.com/images/icon.png?v1
330
330
331
331
For each asset, one of the URLs will be randomly used. But, the selection
332
332
is deterministic, meaning that each asset will always be served by the same
@@ -376,7 +376,7 @@ they all have different base paths::
376
376
$defaultPackage = new Package($versionStrategy);
377
377
378
378
$namedPackages = [
379
- 'img' => new UrlPackage('http ://img.example.com/', $versionStrategy),
379
+ 'img' => new UrlPackage('https ://img.example.com/', $versionStrategy),
380
380
'doc' => new PathPackage('/somewhere/deep/for/documents', $versionStrategy),
381
381
];
382
382
@@ -392,7 +392,7 @@ document inside a template::
392
392
// result: /main.css?v1
393
393
394
394
echo $packages->getUrl('/logo.png', 'img');
395
- // result: http ://img.example.com/logo.png?v1
395
+ // result: https ://img.example.com/logo.png?v1
396
396
397
397
echo $packages->getUrl('resume.pdf', 'doc');
398
398
// result: /somewhere/deep/for/documents/resume.pdf?v1
0 commit comments