-
Notifications
You must be signed in to change notification settings - Fork 42
/
Scope.php
71 lines (60 loc) · 1.54 KB
/
Scope.php
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
<?php
/**
* This file is part of Temporal package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Temporal\Internal\Marshaller\Meta;
use JetBrains\PhpStorm\ExpectedValues;
use Spiral\Attributes\NamedArgumentConstructor;
/**
* @psalm-type ExportScope = Scope::VISIBILITY_*
*
* @Annotation
* @NamedArgumentConstructor
* @Target({ "CLASS" })
*/
#[\Attribute(\Attribute::TARGET_CLASS), NamedArgumentConstructor]
class Scope
{
/**
* @var int
*/
public const VISIBILITY_PRIVATE = \ReflectionProperty::IS_PRIVATE;
/**
* @var int
*/
public const VISIBILITY_PROTECTED = \ReflectionProperty::IS_PROTECTED;
/**
* @var int
*/
public const VISIBILITY_PUBLIC = \ReflectionProperty::IS_PUBLIC;
/**
* @var int
*/
public const VISIBILITY_ALL = self::VISIBILITY_PRIVATE
| self::VISIBILITY_PROTECTED
| self::VISIBILITY_PUBLIC;
/**
* @var ExportScope
*/
#[ExpectedValues(valuesFromClass: Scope::class)]
public int $properties;
/**
* @var bool
*/
public bool $copyOnWrite;
/**
* @param ExportScope $properties
* @param bool $copyOnWrite
*/
public function __construct(
int $properties = self::VISIBILITY_PUBLIC,
bool $copyOnWrite = false
) {
$this->properties = $properties;
$this->copyOnWrite = $copyOnWrite;
}
}