Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/calendar/parser/data/PhutilCalendarContainerNode.php
12262 views
1
<?php
2
3
abstract class PhutilCalendarContainerNode
4
extends PhutilCalendarNode {
5
6
private $children = array();
7
8
final public function getChildren() {
9
return $this->children;
10
}
11
12
final public function getChildrenOfType($type) {
13
$result = array();
14
15
foreach ($this->getChildren() as $key => $child) {
16
if ($child->getNodeType() != $type) {
17
continue;
18
}
19
$result[$key] = $child;
20
}
21
22
return $result;
23
}
24
25
final public function appendChild(PhutilCalendarNode $node) {
26
$this->children[] = $node;
27
return $this;
28
}
29
30
}
31
32