Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
ormconverter.php
1<?php
2
4
8use Bitrix\Location\Model\EO_Area;
9
10final class OrmConverter
11{
16 public static function convertToOrm(Area $area): EO_Area
17 {
19 ->setType($area->getType())
20 ->setCode($area->getCode())
21 ->setSort($area->getCode())
22 ->setGeometry(
24 $area->getGeometry()
25 )
26 );
27 }
28
33 public static function convertFromOrm(EO_Area $area): Area
34 {
35 return (new Area())
36 ->setType($area->getType())
37 ->setCode($area->getCode())
38 ->setSort($area->getSort())
39 ->setGeometry(
41 $area->getGeometry()
42 )
43 );
44 }
45}
setType(string $type)
Definition area.php:39
static makeConverter(string $format)
Definition manager.php:38
static createObject($setDefaultValues=true)