1 | <?php |
||
15 | final class Permissions |
||
16 | { |
||
17 | /** |
||
18 | * @var bool |
||
19 | */ |
||
20 | private $mayPrint; |
||
21 | |||
22 | /** |
||
23 | * @var bool |
||
24 | */ |
||
25 | private $mayPrintHighResolution; |
||
26 | |||
27 | /** |
||
28 | * @var bool |
||
29 | */ |
||
30 | private $mayModify; |
||
31 | |||
32 | /** |
||
33 | * @var bool |
||
34 | */ |
||
35 | private $mayCopy; |
||
36 | |||
37 | /** |
||
38 | * @var bool |
||
39 | */ |
||
40 | private $mayAnnotate; |
||
41 | |||
42 | /** |
||
43 | * @var bool |
||
44 | */ |
||
45 | private $mayFillInForms; |
||
46 | |||
47 | /** |
||
48 | * @var bool |
||
49 | */ |
||
50 | private $mayExtractForAccessibility; |
||
51 | |||
52 | /** |
||
53 | * @var bool |
||
54 | */ |
||
55 | private $mayAssemble; |
||
56 | |||
57 | /** |
||
58 | * @param bool $mayPrint |
||
59 | * @param bool $mayPrintHighResolution |
||
60 | * @param bool $mayModify |
||
61 | * @param bool $mayCopy |
||
62 | * @param bool $mayAnnotate |
||
63 | * @param bool $mayFillInForms |
||
64 | * @param bool $mayExtractForAccessibility |
||
65 | * @param bool $mayAssemble |
||
66 | */ |
||
67 | public function __construct( |
||
86 | |||
87 | /** |
||
88 | * Creates permissions which allow nothing. |
||
89 | * |
||
90 | * @return self |
||
91 | */ |
||
92 | public static function allowNothing() |
||
96 | |||
97 | /** |
||
98 | * Creates permissions which allow everything. |
||
99 | * |
||
100 | * @return self |
||
101 | */ |
||
102 | public static function allowEverything() |
||
106 | |||
107 | /** |
||
108 | * Convert the permissions to am integer bit mask. |
||
109 | * |
||
110 | * {@internal Keep in mind that the bit positions named in the PDF reference are counted from 1, while in here they |
||
111 | * are counted from 0.}} |
||
112 | * |
||
113 | * @param int $revision |
||
114 | * @return int |
||
115 | */ |
||
116 | public function toInt($revision) |
||
133 | } |
||
134 |