ヤミRoot VoidGate
User / IP
:
216.73.216.143
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
logercm
/
dev.loger.cm
/
fixtures
/
assert
/
Viewing: asset.tar
Context/ContextInterface.php 0000644 00000001220 15120140750 0012134 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset\Context; /** * Holds information about the current request. * * @author Fabien Potencier <fabien@symfony.com> */ interface ContextInterface { /** * Gets the base path. * * @return string */ public function getBasePath(); /** * Checks whether the request is secure or not. * * @return bool */ public function isSecure(); } Context/NullContext.php 0000644 00000001165 15120140750 0011156 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset\Context; /** * A context that does nothing. * * @author Fabien Potencier <fabien@symfony.com> */ class NullContext implements ContextInterface { /** * {@inheritdoc} */ public function getBasePath() { return ''; } /** * {@inheritdoc} */ public function isSecure() { return false; } } Context/RequestStackContext.php 0000644 00000002364 15120140750 0012664 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset\Context; use Symfony\Component\HttpFoundation\RequestStack; /** * Uses a RequestStack to populate the context. * * @author Fabien Potencier <fabien@symfony.com> */ class RequestStackContext implements ContextInterface { private $requestStack; private $basePath; private $secure; public function __construct(RequestStack $requestStack, string $basePath = '', bool $secure = false) { $this->requestStack = $requestStack; $this->basePath = $basePath; $this->secure = $secure; } /** * {@inheritdoc} */ public function getBasePath() { if (!$request = $this->requestStack->getMainRequest()) { return $this->basePath; } return $request->getBasePath(); } /** * {@inheritdoc} */ public function isSecure() { if (!$request = $this->requestStack->getMainRequest()) { return $this->secure; } return $request->isSecure(); } } Exception/AssetNotFoundException.php 0000644 00000002031 15120140750 0013615 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset\Exception; /** * Represents an asset not found in a manifest. */ class AssetNotFoundException extends RuntimeException { private $alternatives; /** * @param string $message Exception message to throw * @param array $alternatives List of similar defined names * @param int $code Exception code * @param \Throwable $previous Previous exception used for the exception chaining */ public function __construct(string $message, array $alternatives = [], int $code = 0, \Throwable $previous = null) { parent::__construct($message, $code, $previous); $this->alternatives = $alternatives; } public function getAlternatives(): array { return $this->alternatives; } } Exception/ExceptionInterface.php 0000644 00000000700 15120140750 0012762 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset\Exception; /** * Base ExceptionInterface for the Asset component. * * @author Fabien Potencier <fabien@symfony.com> */ interface ExceptionInterface extends \Throwable { } Exception/InvalidArgumentException.php 0000644 00000000765 15120140750 0014166 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset\Exception; /** * Base InvalidArgumentException for the Asset component. * * @author Fabien Potencier <fabien@symfony.com> */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { } Exception/LogicException.php 0000644 00000000727 15120140750 0012130 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset\Exception; /** * Base LogicException for the Asset component. * * @author Fabien Potencier <fabien@symfony.com> */ class LogicException extends \LogicException implements ExceptionInterface { } Exception/RuntimeException.php 0000644 00000000651 15120140750 0012512 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset\Exception; /** * Base RuntimeException for the Asset component. */ class RuntimeException extends \RuntimeException implements ExceptionInterface { } VersionStrategy/EmptyVersionStrategy.php 0000644 00000001254 15120140750 0014611 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset\VersionStrategy; /** * Disable version for all assets. * * @author Fabien Potencier <fabien@symfony.com> */ class EmptyVersionStrategy implements VersionStrategyInterface { /** * {@inheritdoc} */ public function getVersion(string $path) { return ''; } /** * {@inheritdoc} */ public function applyVersion(string $path) { return $path; } } VersionStrategy/JsonManifestVersionStrategy.php 0000644 00000012070 15120140750 0016111 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset\VersionStrategy; use Symfony\Component\Asset\Exception\AssetNotFoundException; use Symfony\Component\Asset\Exception\LogicException; use Symfony\Component\Asset\Exception\RuntimeException; use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** * Reads the versioned path of an asset from a JSON manifest file. * * For example, the manifest file might look like this: * { * "main.js": "main.abc123.js", * "css/styles.css": "css/styles.555abc.css" * } * * You could then ask for the version of "main.js" or "css/styles.css". */ class JsonManifestVersionStrategy implements VersionStrategyInterface { private $manifestPath; private $manifestData; private $httpClient; private $strictMode; /** * @param string $manifestPath Absolute path to the manifest file * @param bool $strictMode Throws an exception for unknown paths */ public function __construct(string $manifestPath, HttpClientInterface $httpClient = null, $strictMode = false) { $this->manifestPath = $manifestPath; $this->httpClient = $httpClient; $this->strictMode = $strictMode; if (null === $this->httpClient && ($scheme = parse_url($this->manifestPath, \PHP_URL_SCHEME)) && 0 === strpos($scheme, 'http')) { throw new LogicException(sprintf('The "%s" class needs an HTTP client to use a remote manifest. Try running "composer require symfony/http-client".', self::class)); } } /** * With a manifest, we don't really know or care about what * the version is. Instead, this returns the path to the * versioned file. */ public function getVersion(string $path) { return $this->applyVersion($path); } public function applyVersion(string $path) { return $this->getManifestPath($path) ?: $path; } private function getManifestPath(string $path): ?string { if (null === $this->manifestData) { if (null !== $this->httpClient && ($scheme = parse_url($this->manifestPath, \PHP_URL_SCHEME)) && 0 === strpos($scheme, 'http')) { try { $this->manifestData = $this->httpClient->request('GET', $this->manifestPath, [ 'headers' => ['accept' => 'application/json'], ])->toArray(); } catch (DecodingExceptionInterface $e) { throw new RuntimeException(sprintf('Error parsing JSON from asset manifest URL "%s".', $this->manifestPath), 0, $e); } catch (ClientExceptionInterface $e) { throw new RuntimeException(sprintf('Error loading JSON from asset manifest URL "%s".', $this->manifestPath), 0, $e); } } else { if (!is_file($this->manifestPath)) { throw new RuntimeException(sprintf('Asset manifest file "%s" does not exist. Did you forget to build the assets with npm or yarn?', $this->manifestPath)); } $this->manifestData = json_decode(file_get_contents($this->manifestPath), true); if (0 < json_last_error()) { throw new RuntimeException(sprintf('Error parsing JSON from asset manifest file "%s": ', $this->manifestPath).json_last_error_msg()); } } } if (isset($this->manifestData[$path])) { return $this->manifestData[$path]; } if ($this->strictMode) { $message = sprintf('Asset "%s" not found in manifest "%s".', $path, $this->manifestPath); $alternatives = $this->findAlternatives($path, $this->manifestData); if (\count($alternatives) > 0) { $message .= sprintf(' Did you mean one of these? "%s".', implode('", "', $alternatives)); } throw new AssetNotFoundException($message, $alternatives); } return null; } private function findAlternatives(string $path, array $manifestData): array { $path = strtolower($path); $alternatives = []; foreach ($manifestData as $key => $value) { $lev = levenshtein($path, strtolower($key)); if ($lev <= \strlen($path) / 3 || false !== stripos($key, $path)) { $alternatives[$key] = isset($alternatives[$key]) ? min($lev, $alternatives[$key]) : $lev; } $lev = levenshtein($path, strtolower($value)); if ($lev <= \strlen($path) / 3 || false !== stripos($key, $path)) { $alternatives[$key] = isset($alternatives[$key]) ? min($lev, $alternatives[$key]) : $lev; } } asort($alternatives); return array_keys($alternatives); } } VersionStrategy/RemoteJsonManifestVersionStrategy.php 0000644 00000003652 15120140750 0017273 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset\VersionStrategy; use Symfony\Contracts\HttpClient\HttpClientInterface; trigger_deprecation('symfony/asset', '5.3', 'The "%s" class is deprecated, use "%s" instead.', RemoteJsonManifestVersionStrategy::class, JsonManifestVersionStrategy::class); /** * Reads the versioned path of an asset from a remote JSON manifest file. * * For example, the manifest file might look like this: * { * "main.js": "main.abc123.js", * "css/styles.css": "css/styles.555abc.css" * } * * You could then ask for the version of "main.js" or "css/styles.css". * * @deprecated since Symfony 5.3, use JsonManifestVersionStrategy instead. */ class RemoteJsonManifestVersionStrategy implements VersionStrategyInterface { private $manifestData; private $manifestUrl; private $httpClient; /** * @param string $manifestUrl Absolute URL to the manifest file */ public function __construct(string $manifestUrl, HttpClientInterface $httpClient) { $this->manifestUrl = $manifestUrl; $this->httpClient = $httpClient; } /** * With a manifest, we don't really know or care about what * the version is. Instead, this returns the path to the * versioned file. */ public function getVersion(string $path) { return $this->applyVersion($path); } public function applyVersion(string $path) { if (null === $this->manifestData) { $this->manifestData = $this->httpClient->request('GET', $this->manifestUrl, [ 'headers' => ['accept' => 'application/json'], ])->toArray(); } return $this->manifestData[$path] ?? $path; } } VersionStrategy/StaticVersionStrategy.php 0000644 00000002265 15120140750 0014745 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset\VersionStrategy; /** * Returns the same version for all assets. * * @author Fabien Potencier <fabien@symfony.com> */ class StaticVersionStrategy implements VersionStrategyInterface { private $version; private $format; /** * @param string $version Version number * @param string $format Url format */ public function __construct(string $version, string $format = null) { $this->version = $version; $this->format = $format ?: '%s?%s'; } /** * {@inheritdoc} */ public function getVersion(string $path) { return $this->version; } /** * {@inheritdoc} */ public function applyVersion(string $path) { $versionized = sprintf($this->format, ltrim($path, '/'), $this->getVersion($path)); if ($path && '/' === $path[0]) { return '/'.$versionized; } return $versionized; } } VersionStrategy/VersionStrategyInterface.php 0000644 00000001277 15120140750 0015420 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset\VersionStrategy; /** * Asset version strategy interface. * * @author Fabien Potencier <fabien@symfony.com> */ interface VersionStrategyInterface { /** * Returns the asset version for an asset. * * @return string */ public function getVersion(string $path); /** * Applies version to the supplied path. * * @return string */ public function applyVersion(string $path); } CHANGELOG.md 0000644 00000001161 15120140750 0006347 0 ustar 00 CHANGELOG ========= 5.3 --- * deprecated `RemoteJsonManifestVersionStrategy`, use `JsonManifestVersionStrategy` instead. 5.1.0 ----- * added `RemoteJsonManifestVersionStrategy` to download manifest over HTTP. 4.2.0 ----- * added different protocols to be allowed as asset base_urls 3.4.0 ----- * added optional arguments `$basePath` and `$secure` in `RequestStackContext::__construct()` to provide a default request context in case the stack is empty 3.3.0 ----- * Added `JsonManifestVersionStrategy` as a way to read final, versioned paths from a JSON manifest file. 2.7.0 ----- * added the component LICENSE 0000644 00000002054 15120140750 0005545 0 ustar 00 Copyright (c) 2004-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Package.php 0000644 00000003350 15120140750 0006604 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset; use Symfony\Component\Asset\Context\ContextInterface; use Symfony\Component\Asset\Context\NullContext; use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface; /** * Basic package that adds a version to asset URLs. * * @author Kris Wallsmith <kris@symfony.com> * @author Fabien Potencier <fabien@symfony.com> */ class Package implements PackageInterface { private $versionStrategy; private $context; public function __construct(VersionStrategyInterface $versionStrategy, ContextInterface $context = null) { $this->versionStrategy = $versionStrategy; $this->context = $context ?? new NullContext(); } /** * {@inheritdoc} */ public function getVersion(string $path) { return $this->versionStrategy->getVersion($path); } /** * {@inheritdoc} */ public function getUrl(string $path) { if ($this->isAbsoluteUrl($path)) { return $path; } return $this->versionStrategy->applyVersion($path); } /** * @return ContextInterface */ protected function getContext() { return $this->context; } /** * @return VersionStrategyInterface */ protected function getVersionStrategy() { return $this->versionStrategy; } /** * @return bool */ protected function isAbsoluteUrl(string $url) { return str_contains($url, '://') || '//' === substr($url, 0, 2); } } PackageInterface.php 0000644 00000001240 15120140750 0010421 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset; /** * Asset package interface. * * @author Kris Wallsmith <kris@symfony.com> */ interface PackageInterface { /** * Returns the asset version for an asset. * * @return string */ public function getVersion(string $path); /** * Returns an absolute or root-relative public path. * * @return string */ public function getUrl(string $path); } Packages.php 0000644 00000005532 15120140750 0006773 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset; use Symfony\Component\Asset\Exception\InvalidArgumentException; use Symfony\Component\Asset\Exception\LogicException; /** * Helps manage asset URLs. * * @author Fabien Potencier <fabien@symfony.com> * @author Kris Wallsmith <kris@symfony.com> */ class Packages { private $defaultPackage; private $packages = []; /** * @param PackageInterface[] $packages Additional packages indexed by name */ public function __construct(PackageInterface $defaultPackage = null, iterable $packages = []) { $this->defaultPackage = $defaultPackage; foreach ($packages as $name => $package) { $this->addPackage($name, $package); } } public function setDefaultPackage(PackageInterface $defaultPackage) { $this->defaultPackage = $defaultPackage; } public function addPackage(string $name, PackageInterface $package) { $this->packages[$name] = $package; } /** * Returns an asset package. * * @param string $name The name of the package or null for the default package * * @return PackageInterface * * @throws InvalidArgumentException If there is no package by that name * @throws LogicException If no default package is defined */ public function getPackage(string $name = null) { if (null === $name) { if (null === $this->defaultPackage) { throw new LogicException('There is no default asset package, configure one first.'); } return $this->defaultPackage; } if (!isset($this->packages[$name])) { throw new InvalidArgumentException(sprintf('There is no "%s" asset package.', $name)); } return $this->packages[$name]; } /** * Gets the version to add to public URL. * * @param string $path A public path * @param string $packageName A package name * * @return string */ public function getVersion(string $path, string $packageName = null) { return $this->getPackage($packageName)->getVersion($path); } /** * Returns the public path. * * Absolute paths (i.e. http://...) are returned unmodified. * * @param string $path A public path * @param string $packageName The name of the asset package to use * * @return string A public path which takes into account the base path and URL path */ public function getUrl(string $path, string $packageName = null) { return $this->getPackage($packageName)->getUrl($path); } } PathPackage.php 0000644 00000003660 15120140750 0007425 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset; use Symfony\Component\Asset\Context\ContextInterface; use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface; /** * Package that adds a base path to asset URLs in addition to a version. * * In addition to the provided base path, this package also automatically * prepends the current request base path if a Context is available to * allow a website to be hosted easily under any given path under the Web * Server root directory. * * @author Fabien Potencier <fabien@symfony.com> */ class PathPackage extends Package { private $basePath; /** * @param string $basePath The base path to be prepended to relative paths */ public function __construct(string $basePath, VersionStrategyInterface $versionStrategy, ContextInterface $context = null) { parent::__construct($versionStrategy, $context); if (!$basePath) { $this->basePath = '/'; } else { if ('/' != $basePath[0]) { $basePath = '/'.$basePath; } $this->basePath = rtrim($basePath, '/').'/'; } } /** * {@inheritdoc} */ public function getUrl(string $path) { $versionedPath = parent::getUrl($path); // if absolute or begins with /, we're done if ($this->isAbsoluteUrl($versionedPath) || ($versionedPath && '/' === $versionedPath[0])) { return $versionedPath; } return $this->getBasePath().ltrim($versionedPath, '/'); } /** * Returns the base path. * * @return string */ public function getBasePath() { return $this->getContext()->getBasePath().$this->basePath; } } README.md 0000644 00000001050 15120140750 0006012 0 ustar 00 Asset Component =============== The Asset component manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files. Resources --------- * [Documentation](https://symfony.com/doc/current/components/asset/introduction.html) * [Contributing](https://symfony.com/doc/current/contributing/index.html) * [Report issues](https://github.com/symfony/symfony/issues) and [send Pull Requests](https://github.com/symfony/symfony/pulls) in the [main Symfony repository](https://github.com/symfony/symfony) UrlPackage.php 0000644 00000007372 15120140750 0007277 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Asset; use Symfony\Component\Asset\Context\ContextInterface; use Symfony\Component\Asset\Exception\InvalidArgumentException; use Symfony\Component\Asset\Exception\LogicException; use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface; /** * Package that adds a base URL to asset URLs in addition to a version. * * The package allows to use more than one base URLs in which case * it randomly chooses one for each asset; it also guarantees that * any given path will always use the same base URL to be nice with * HTTP caching mechanisms. * * When the request context is available, this package can choose the * best base URL to use based on the current request scheme: * * * For HTTP request, it chooses between all base URLs; * * For HTTPs requests, it chooses between HTTPs base URLs and relative protocol URLs * or falls back to any base URL if no secure ones are available. * * @author Fabien Potencier <fabien@symfony.com> */ class UrlPackage extends Package { private $baseUrls = []; private $sslPackage; /** * @param string|string[] $baseUrls Base asset URLs */ public function __construct($baseUrls, VersionStrategyInterface $versionStrategy, ContextInterface $context = null) { parent::__construct($versionStrategy, $context); if (!\is_array($baseUrls)) { $baseUrls = (array) $baseUrls; } if (!$baseUrls) { throw new LogicException('You must provide at least one base URL.'); } foreach ($baseUrls as $baseUrl) { $this->baseUrls[] = rtrim($baseUrl, '/'); } $sslUrls = $this->getSslUrls($baseUrls); if ($sslUrls && $baseUrls !== $sslUrls) { $this->sslPackage = new self($sslUrls, $versionStrategy); } } /** * {@inheritdoc} */ public function getUrl(string $path) { if ($this->isAbsoluteUrl($path)) { return $path; } if (null !== $this->sslPackage && $this->getContext()->isSecure()) { return $this->sslPackage->getUrl($path); } $url = $this->getVersionStrategy()->applyVersion($path); if ($this->isAbsoluteUrl($url)) { return $url; } if ($url && '/' != $url[0]) { $url = '/'.$url; } return $this->getBaseUrl($path).$url; } /** * Returns the base URL for a path. * * @return string */ public function getBaseUrl(string $path) { if (1 === \count($this->baseUrls)) { return $this->baseUrls[0]; } return $this->baseUrls[$this->chooseBaseUrl($path)]; } /** * Determines which base URL to use for the given path. * * Override this method to change the default distribution strategy. * This method should always return the same base URL index for a given path. * * @return int */ protected function chooseBaseUrl(string $path) { return (int) fmod(hexdec(substr(hash('sha256', $path), 0, 10)), \count($this->baseUrls)); } private function getSslUrls(array $urls) { $sslUrls = []; foreach ($urls as $url) { if ('https://' === substr($url, 0, 8) || '//' === substr($url, 0, 2)) { $sslUrls[] = $url; } elseif (null === parse_url($url, \PHP_URL_SCHEME)) { throw new InvalidArgumentException(sprintf('"%s" is not a valid URL.', $url)); } } return $sslUrls; } } composer.json 0000644 00000002165 15120140750 0007265 0 ustar 00 { "name": "symfony/asset", "type": "library", "description": "Manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files", "keywords": [], "homepage": "https://symfony.com", "license": "MIT", "authors": [ { "name": "Fabien Potencier", "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "require": { "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-php80": "^1.16" }, "suggest": { "symfony/http-foundation": "" }, "require-dev": { "symfony/http-client": "^4.4|^5.0|^6.0", "symfony/http-foundation": "^5.3|^6.0", "symfony/http-kernel": "^4.4|^5.0|^6.0" }, "conflict": { "symfony/http-foundation": "<5.3" }, "autoload": { "psr-4": { "Symfony\\Component\\Asset\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev" }
Coded With 💗 by
0x6ick