Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
publicactionresult.php
1<?php
2namespace Bitrix\Landing;
3
5{
10 protected $error = null;
11
16 protected $result = null;
17
21 public function __construct()
22 {
23 $this->error = new Error;
24 }
25
30 public function isSuccess()
31 {
32 return $this->error->isEmpty();
33 }
34
41 {
42 $this->error->copyError($error);
43 }
44
49 public function getError()
50 {
51 return $this->error;
52 }
53
59 public function setResult($result)
60 {
61 $this->result = $result;
62 }
63
68 public function getResult()
69 {
70 return $this->result;
71 }
72
79 public function sanitizeKeys($data, $sanitizeValue = false)
80 {
81 if (is_array($data))
82 {
83 foreach ($data as $key => $value)
84 {
85 if (
86 mb_strpos($key, '.') !== false ||
87 mb_strtolower($key) == 'runtime' ||
88 $sanitizeValue && mb_strpos($value, '.') !== false
89 )
90 {
91 unset($data[$key]);
92 }
93 else
94 {
95 $data[$key] = $this->sanitizeKeys(
96 $value,
97 mb_strtolower($key) == 'select'
98 );
99 }
100 }
101 }
102 return $data;
103 }
104}
setError(\Bitrix\Landing\Error $error)
sanitizeKeys($data, $sanitizeValue=false)