Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/landing/lib/source/ |
Upload File : |
<?php namespace Bitrix\Landing\Source; class BlockFilter { /** * @param array $row * @return bool */ public static function checkRow($row) { if (empty($row) || !is_array($row)) { return false; } if (empty($row['name']) || !is_string($row['name'])) { return false; } if (empty($row['key']) || !is_string($row['key'])) { return false; } if (empty($row['value']) || !is_array($row['value'])) { return false; } return true; } /** * @param array $row * @return bool */ public static function checkPreparedRow($row) { if (empty($row) || !is_array($row)) { return false; } if (empty($row['key']) || empty($row['value']) || !is_array($row['value'])) { return false; } return true; } /** * @param string $name * @param string $key * @param array $value * @return array|null */ public static function createRow(string $name, string $key, array $value) { $name = trim($name); $key = trim($key); if ($name === '' || $key === '' || empty($value)) { return null; } return [ 'name' => $name, 'key' => $key, 'value' => $value ]; } }