1 | <?php |
||
24 | class Page |
||
25 | { |
||
26 | /** |
||
27 | * Path to the page. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | private $path; |
||
32 | |||
33 | /** |
||
34 | * URL of the page. |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | private $url; |
||
39 | |||
40 | /** |
||
41 | * Title of the page. |
||
42 | * |
||
43 | * @var string |
||
44 | */ |
||
45 | private $title; |
||
46 | |||
47 | /** |
||
48 | * Description of the page. |
||
49 | * |
||
50 | * @var string |
||
51 | */ |
||
52 | private $description; |
||
53 | |||
54 | /** |
||
55 | * Name of the author, displayed below the title. |
||
56 | * |
||
57 | * @var string |
||
58 | */ |
||
59 | private $authorName; |
||
60 | |||
61 | /** |
||
62 | * Profile link, opened when users click on the author's name below the title. |
||
63 | * Can be any link, not necessarily to a Telegram profile or channel. |
||
64 | * |
||
65 | * @var string |
||
66 | */ |
||
67 | private $authorUrl; |
||
68 | |||
69 | /** |
||
70 | * Image URL of the page. |
||
71 | * |
||
72 | * @var string |
||
73 | */ |
||
74 | private $imageUrl; |
||
75 | |||
76 | /** |
||
77 | * Content of the page. |
||
78 | * |
||
79 | * @var string|NodeElement[] |
||
80 | */ |
||
81 | private $content; |
||
82 | |||
83 | /** |
||
84 | * Number of page views for the page. |
||
85 | * |
||
86 | * @var int |
||
87 | */ |
||
88 | private $views; |
||
89 | |||
90 | /** |
||
91 | * Only returned if access_token passed. |
||
92 | * True, if the target Telegraph account can edit the page. |
||
93 | * |
||
94 | * @var bool |
||
95 | */ |
||
96 | private $canEdit; |
||
97 | |||
98 | public function __construct(array $data) |
||
111 | |||
112 | /** |
||
113 | * @return string |
||
114 | */ |
||
115 | public function getPath(): string |
||
119 | |||
120 | /** |
||
121 | * @return string |
||
122 | */ |
||
123 | public function getUrl(): string |
||
127 | |||
128 | /** |
||
129 | * @return string |
||
130 | */ |
||
131 | public function getTitle(): string |
||
135 | |||
136 | /** |
||
137 | * @return string |
||
138 | */ |
||
139 | public function getDescription(): string |
||
143 | |||
144 | /** |
||
145 | * @return string |
||
146 | */ |
||
147 | public function getAuthorName(): string |
||
151 | |||
152 | /** |
||
153 | * @return string |
||
154 | */ |
||
155 | public function getAuthorUrl(): string |
||
159 | |||
160 | /** |
||
161 | * @return string |
||
162 | */ |
||
163 | public function getImageUrl(): string |
||
167 | |||
168 | /** |
||
169 | * @return string|NodeElement[] |
||
170 | */ |
||
171 | public function getContent() |
||
175 | |||
176 | /** |
||
177 | * @return int |
||
178 | */ |
||
179 | public function getViews(): int |
||
183 | |||
184 | /** |
||
185 | * @return bool |
||
186 | */ |
||
187 | public function isCanEdit(): bool |
||
191 | } |
||
192 |