Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
ipruleexcliptable.php
1<?php
2
3namespace Bitrix\Security;
4
6
23class IPRuleExclIPTable extends \Bitrix\Main\Entity\DataManager
24{
25 public static function getTableName()
26 {
27 return 'b_sec_iprule_excl_ip';
28 }
29
30 public static function getMap()
31 {
32 return [
33 (new \Bitrix\Main\Entity\IntegerField('IPRULE_ID'))
34 ->configurePrimary(),
35 (new \Bitrix\Main\Entity\StringField('RULE_IP'))
36 ->configurePrimary()
37 ->configureSize(50),
38 (new \Bitrix\Main\Entity\IntegerField('SORT'))
39 ->configureDefaultValue(500),
40 (new \Bitrix\Main\Entity\IntegerField('IP_START'))
41 ->configureSize(18)
42 ->configureNullable(),
43 (new \Bitrix\Main\Entity\IntegerField('IP_END'))
44 ->configureSize(18)
45 ->configureNullable()
46 ];
47 }
48
49 public static function getCollectionClass()
50 {
51 return IPRuleExclIPs::class;
52 }
53
54 public static function getObjectClass()
55 {
56 return IPRuleExclIP::class;
57 }
58
59 public static function deleteList(array $filter)
60 {
61 $entity = static::getEntity();
62 $connection = $entity->getConnection();
63
64 $where = Query::buildFilterSql($entity, $filter);
65 $where = $where ? 'WHERE ' . $where : '';
66
67 $sql = sprintf(
68 'DELETE FROM %s %s',
69 $connection->getSqlHelper()->quote($entity->getDbTableName()),
70 $where
71 );
72
73 $res = $connection->query($sql);
74
75 return $res;
76 }
77
78}
79
80class IPRuleExclIPs extends EO_IPRuleExclIP_Collection
81{
82}
83
84class IPRuleExclIP extends EO_IPRuleExclIP
85{
86}