Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
Google.php
1<?php
2
4
10
15{
16 public const TYPE_CODE = Webmaster\Service::TYPE_GOOGLE;
17
23 public function getSites(): Response
24 {
25 return $this->getRequest()->send([
26 'methodName' => 'webmaster.sites.get',
27 ]);
28 }
29
36 public function addSite(string $site): Response
37 {
38 return $this->getRequest()->send([
39 'methodName' => 'webmaster.sites.add',
40 'parameters' => [
41 'site' => HtmlFilter::encode($site),
42 ],
43 ]);
44 }
45
53 public function getVerifyToken(array $data): Response
54 {
55 return $this->getRequest()->send([
56 'methodName' => 'webmaster.verify.token.get',
57 'parameters' => [
58 'data' => Json::encode($data),
59 ],
60 ]);
61 }
62
70 public function verifySite(array $data): Response
71 {
72 return $this->getRequest()->send([
73 'methodName' => 'webmaster.verify.site',
74 'parameters' => [
75 'data' => Json::encode($data),
76 ],
77 ]);
78 }
79}
static encode($string, $flags=ENT_COMPAT, $doubleEncode=true)