1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
pool.php
См. документацию.
1<?php
3
7
13{
18 public function getItem(string $index)
19 {
20 $result = parent::getItem($index);
21
22 try
23 {
24 $result = Json::decode($result);
25 $result = Location::fromArray($result);
26 }
27 catch (\Exception $e)
28 {
29 $result = null;
30 }
31
32 return $result;
33 }
34
35 public function addItem(string $index, $location): void
36 {
37 if(!($location instanceof Location))
38 {
39 throw new ArgumentTypeException('location must be type of Location');
40 }
41
42 parent::addItem(
43 $index, Json::encode(
44 $location->toArray()
45 )
46 );
47 }
48}
addItem(string $index, $location)
Определения pool.php:35
getItem(string $index)
Определения pool.php:18
Определения json.php:9
$result
Определения get_property_values.php:14
$location
Определения options.php:2729