Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
ipruleinclmasktable.php
1<?php
2
3namespace Bitrix\Security;
4
6
23class IPRuleInclMaskTable extends \Bitrix\Main\Entity\DataManager
24{
25 public static function getTableName()
26 {
27 return 'b_sec_iprule_incl_mask';
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_MASK'))
36 ->configurePrimary()
37 ->configureSize(250),
38 (new \Bitrix\Main\Entity\IntegerField('SORT'))
39 ->configureDefaultValue(500),
40 (new \Bitrix\Main\Entity\StringField('LIKE_MASK'))
41 ->configureSize(250)
42 ->configureNullable(),
43 (new \Bitrix\Main\Entity\StringField('PREG_MASK'))
44 ->configureSize(250)
45 ->configureNullable(),
46 ];
47 }
48
49 public static function getCollectionClass()
50 {
51 return IPRuleInclMasks::class;
52 }
53
54 public static function getObjectClass()
55 {
56 return IPRuleInclMask::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 IPRuleInclMasks extends EO_IPRuleInclMask_Collection
81{
82}
83
84class IPRuleInclMask extends EO_IPRuleInclMask
85{
86}