@@ -294,12 +294,12 @@ class to generate absolute URLs for their assets::
294
294
// ...
295
295
296
296
$urlPackage = new UrlPackage(
297
- 'http ://static.example.com/images/',
297
+ 'https ://static.example.com/images/',
298
298
new StaticVersionStrategy('v1')
299
299
);
300
300
301
301
echo $urlPackage->getUrl('/logo.png');
302
- // result: http ://static.example.com/images/logo.png?v1
302
+ // result: https ://static.example.com/images/logo.png?v1
303
303
304
304
You can also pass a schema-agnostic URL::
305
305
@@ -326,15 +326,15 @@ constructor::
326
326
// ...
327
327
328
328
$urls = [
329
- '//static1.example.com/images/',
330
- '//static2.example.com/images/',
329
+ 'https: //static1.example.com/images/',
330
+ 'https: //static2.example.com/images/',
331
331
];
332
332
$urlPackage = new UrlPackage($urls, new StaticVersionStrategy('v1'));
333
333
334
334
echo $urlPackage->getUrl('/logo.png');
335
- // result: http ://static1.example.com/images/logo.png?v1
335
+ // result: https ://static1.example.com/images/logo.png?v1
336
336
echo $urlPackage->getUrl('/icon.png');
337
- // result: http ://static2.example.com/images/icon.png?v1
337
+ // result: https ://static2.example.com/images/icon.png?v1
338
338
339
339
For each asset, one of the URLs will be randomly used. But, the selection
340
340
is deterministic, meaning that each asset will always be served by the same
@@ -384,7 +384,7 @@ they all have different base paths::
384
384
$defaultPackage = new Package($versionStrategy);
385
385
386
386
$namedPackages = [
387
- 'img' => new UrlPackage('http ://img.example.com/', $versionStrategy),
387
+ 'img' => new UrlPackage('https ://img.example.com/', $versionStrategy),
388
388
'doc' => new PathPackage('/somewhere/deep/for/documents', $versionStrategy),
389
389
];
390
390
@@ -400,7 +400,7 @@ document inside a template::
400
400
// result: /main.css?v1
401
401
402
402
echo $packages->getUrl('/logo.png', 'img');
403
- // result: http ://img.example.com/logo.png?v1
403
+ // result: https ://img.example.com/logo.png?v1
404
404
405
405
echo $packages->getUrl('resume.pdf', 'doc');
406
406
// result: /somewhere/deep/for/documents/resume.pdf?v1
0 commit comments