mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 19:21:33 +00:00
Import latest app updates from streamline
An updated set of source files and initialization was provided by streamline to address issues observed during initial testing. These files have been updated in order to generate a new set of app images.
This commit is contained in:
Vendored
-30
@@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace League\Flysystem\UrlGeneration;
|
||||
|
||||
use League\Flysystem\Config;
|
||||
use League\Flysystem\UnableToGeneratePublicUrl;
|
||||
|
||||
final class ChainedPublicUrlGenerator implements PublicUrlGenerator
|
||||
{
|
||||
/**
|
||||
* @param PublicUrlGenerator[] $generators
|
||||
*/
|
||||
public function __construct(private iterable $generators)
|
||||
{
|
||||
}
|
||||
|
||||
public function publicUrl(string $path, Config $config): string
|
||||
{
|
||||
foreach ($this->generators as $generator) {
|
||||
try {
|
||||
return $generator->publicUrl($path, $config);
|
||||
} catch (UnableToGeneratePublicUrl) {
|
||||
}
|
||||
}
|
||||
|
||||
throw new UnableToGeneratePublicUrl('No supported public url generator found.', $path);
|
||||
}
|
||||
}
|
||||
Vendored
-23
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace League\Flysystem\UrlGeneration;
|
||||
|
||||
use League\Flysystem\Config;
|
||||
use League\Flysystem\PathPrefixer;
|
||||
|
||||
class PrefixPublicUrlGenerator implements PublicUrlGenerator
|
||||
{
|
||||
private PathPrefixer $prefixer;
|
||||
|
||||
public function __construct(string $urlPrefix)
|
||||
{
|
||||
$this->prefixer = new PathPrefixer($urlPrefix, '/');
|
||||
}
|
||||
|
||||
public function publicUrl(string $path, Config $config): string
|
||||
{
|
||||
return $this->prefixer->prefixPath($path);
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace League\Flysystem\UrlGeneration;
|
||||
|
||||
use League\Flysystem\Config;
|
||||
use League\Flysystem\UnableToGeneratePublicUrl;
|
||||
|
||||
interface PublicUrlGenerator
|
||||
{
|
||||
/**
|
||||
* @throws UnableToGeneratePublicUrl
|
||||
*/
|
||||
public function publicUrl(string $path, Config $config): string;
|
||||
}
|
||||
Vendored
-39
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace League\Flysystem\UrlGeneration;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use League\Flysystem\Config;
|
||||
use League\Flysystem\PathPrefixer;
|
||||
|
||||
use function array_map;
|
||||
use function count;
|
||||
use function crc32;
|
||||
|
||||
final class ShardedPrefixPublicUrlGenerator implements PublicUrlGenerator
|
||||
{
|
||||
/** @var PathPrefixer[] */
|
||||
private array $prefixes;
|
||||
private int $count;
|
||||
|
||||
/**
|
||||
* @param string[] $prefixes
|
||||
*/
|
||||
public function __construct(array $prefixes)
|
||||
{
|
||||
$this->count = count($prefixes);
|
||||
|
||||
if ($this->count === 0) {
|
||||
throw new InvalidArgumentException('At least one prefix is required.');
|
||||
}
|
||||
|
||||
$this->prefixes = array_map(static fn (string $prefix) => new PathPrefixer($prefix, '/'), $prefixes);
|
||||
}
|
||||
|
||||
public function publicUrl(string $path, Config $config): string
|
||||
{
|
||||
$index = abs(crc32($path)) % $this->count;
|
||||
|
||||
return $this->prefixes[$index]->prefixPath($path);
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace League\Flysystem\UrlGeneration;
|
||||
|
||||
use DateTimeInterface;
|
||||
use League\Flysystem\Config;
|
||||
use League\Flysystem\UnableToGenerateTemporaryUrl;
|
||||
|
||||
interface TemporaryUrlGenerator
|
||||
{
|
||||
/**
|
||||
* @throws UnableToGenerateTemporaryUrl
|
||||
*/
|
||||
public function temporaryUrl(string $path, DateTimeInterface $expiresAt, Config $config): string;
|
||||
}
|
||||
Reference in New Issue
Block a user