-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdeepclone.stub.php
More file actions
55 lines (44 loc) · 1.58 KB
/
Copy pathdeepclone.stub.php
File metadata and controls
55 lines (44 loc) · 1.58 KB
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
<?php
/**
* @generate-class-entries
*/
namespace DeepClone {
class NotInstantiableException extends \InvalidArgumentException {}
class ClassNotFoundException extends \InvalidArgumentException {}
/**
* Shared hydration state behind the lazy ghosts deepclone_from_array()
* creates for closure-bearing object nodes: retains the payload, the
* object table, the shared references and the allow-list until every
* ghost has been initialized. Instances are created internally only;
* the ghosts' initializer (as returned by
* ReflectionClass::getLazyInitializer()) is a Closure bound to one.
*
* @strict-properties
* @not-serializable
*/
final class HydrationContext
{
private function __construct() {}
private function hydrate(object $object): void {}
}
}
namespace {
/**
* @var int
* @cvalue DEEPCLONE_HYDRATE_CALL_HOOKS
*/
const DEEPCLONE_HYDRATE_CALL_HOOKS = UNKNOWN;
/**
* @var int
* @cvalue DEEPCLONE_HYDRATE_NO_LAZY_INIT
*/
const DEEPCLONE_HYDRATE_NO_LAZY_INIT = UNKNOWN;
/**
* @var int
* @cvalue DEEPCLONE_HYDRATE_PRESERVE_REFS
*/
const DEEPCLONE_HYDRATE_PRESERVE_REFS = UNKNOWN;
function deepclone_to_array(mixed $value, ?array $allowed_classes = null, bool $allow_named_closures = false): array {}
function deepclone_from_array(array $data, ?array $allowed_classes = null, bool $allow_named_closures = false): mixed {}
function deepclone_hydrate(object|string $object_or_class, array $vars = [], int $flags = 0): object {}
}