composeer update
This commit is contained in:
@@ -68,7 +68,7 @@ class FileLinkFormatter
|
||||
*/
|
||||
public function __sleep(): array
|
||||
{
|
||||
$this->getFileLinkFormat();
|
||||
$this->fileLinkFormat = $this->getFileLinkFormat();
|
||||
|
||||
return ['fileLinkFormat'];
|
||||
}
|
||||
@@ -87,17 +87,19 @@ class FileLinkFormatter
|
||||
|
||||
private function getFileLinkFormat()
|
||||
{
|
||||
if ($this->fileLinkFormat) {
|
||||
return $this->fileLinkFormat;
|
||||
}
|
||||
|
||||
if ($this->requestStack && $this->baseDir && $this->urlFormat) {
|
||||
$request = $this->requestStack->getMasterRequest();
|
||||
|
||||
if ($request instanceof Request && (!$this->urlFormat instanceof \Closure || $this->urlFormat = ($this->urlFormat)())) {
|
||||
$this->fileLinkFormat = [
|
||||
return [
|
||||
$request->getSchemeAndHttpHost().$request->getBasePath().$this->urlFormat,
|
||||
$this->baseDir.\DIRECTORY_SEPARATOR, '',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return $this->fileLinkFormat;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user