1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
attachcollection.php
См. документацию.
1<?php
2
3
4namespace Bitrix\Calendar\ICal\Builder;
5
6
7use Bitrix\Calendar\SerializeObject;
8use ArrayIterator;
9use IteratorAggregate;
10use LogicException;
11use Serializable;
12
13class AttachCollection implements IteratorAggregate, Serializable
14{
15 use SerializeObject;
19 private $collection;
20
25 public static function createInstance(array $collection = []): AttachCollection
26 {
27 return new self($collection);
28 }
29
34 public function __construct(array $collection = [])
35 {
36 if (!$this->checkCollection($collection))
37 {
38 throw new LogicException('The collection contains elements of the wrong class. You need to pass a collection of objects Bitrix\\Calendar\\ICal\\Parser\\Attendee');
39 }
40 $this->collection = $collection;
41 }
42
47 public function add(Attach $attach): AttachCollection
48 {
49 $this->collection[] = $attach;
50
51 return $this;
52 }
53
57 public function getCollection(): array
58 {
59 return $this->collection;
60 }
61
65 public function getIterator(): ArrayIterator
66 {
67 return new ArrayIterator($this->collection);
68 }
69
70 public function getCount(): int
71 {
72 return count($this->collection);
73 }
74
78 private function checkCollection(array $collection): bool
79 {
80 if (is_null($collection))
81 {
82 return true;
83 }
84
85 $attach = array_filter($collection, function ($attach) {
86 return !($attach instanceof Attach);
87 });
88
89 return empty($attach);
90 }
91}
__construct(array $collection=[])
Определения attachcollection.php:34
static createInstance(array $collection=[])
Определения attachcollection.php:25
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения waybill.php:936