1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
<?php
// Generated by scripts/plugin-stub-generator; do not edit by hand.
// Guard for Composer\Json\JsonFile.
// The Rust side owns this class and the worker has no proxy for it, so this
// declaration shadows the real one: the constants and the hierarchy stay, while
// constructing it or calling anything on it raises an explicit error.
namespace Composer\Json;
use Composer\Util\HttpDownloader;
use Composer\IO\IOInterface;
class JsonFile
{
public const LAX_SCHEMA = 1;
public const STRICT_SCHEMA = 2;
public const AUTH_SCHEMA = 3;
public const LOCK_SCHEMA = 4;
public const JSON_UNESCAPED_SLASHES = 64;
public const JSON_PRETTY_PRINT = 128;
public const JSON_UNESCAPED_UNICODE = 256;
public const COMPOSER_SCHEMA_PATH = __DIR__ . '/../../../res/composer-schema.json';
public const LOCK_SCHEMA_PATH = __DIR__ . '/../../../res/composer-lock-schema.json';
public const INDENT_DEFAULT = ' ';
public function __construct(string $path, ?HttpDownloader $httpDownloader = null, ?IOInterface $io = null)
{
\ShirabeUnsupportedClass::fail(self::class, '__construct');
}
public function getPath(): string
{
\ShirabeUnsupportedClass::fail(self::class, 'getPath');
}
public function exists(): bool
{
\ShirabeUnsupportedClass::fail(self::class, 'exists');
}
public function read()
{
\ShirabeUnsupportedClass::fail(self::class, 'read');
}
public function write(array $hash, int $options = JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)
{
\ShirabeUnsupportedClass::fail(self::class, 'write');
}
public function validateSchema(int $schema = self::STRICT_SCHEMA, ?string $schemaFile = null): bool
{
\ShirabeUnsupportedClass::fail(self::class, 'validateSchema');
}
public static function validateJsonSchema(string $source, $data, int $schema, ?string $schemaFile = null): bool
{
\ShirabeUnsupportedClass::fail(self::class, 'validateJsonSchema');
}
public static function encode($data, int $options = \JSON_UNESCAPED_SLASHES | \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE, string $indent = self::INDENT_DEFAULT): string
{
\ShirabeUnsupportedClass::fail(self::class, 'encode');
}
public static function parseJson(?string $json, ?string $file = null)
{
\ShirabeUnsupportedClass::fail(self::class, 'parseJson');
}
protected static function validateSyntax(string $json, ?string $file = null): bool
{
\ShirabeUnsupportedClass::fail(self::class, 'validateSyntax');
}
public static function detectIndenting(?string $json): string
{
\ShirabeUnsupportedClass::fail(self::class, 'detectIndenting');
}
}
|