/** * @param RTFGroup $root * @param string $control * @return null */ private function findGroup($root, $control) { if (!$root) { return null; } if ($root->hasControlWord($control)) { return $root; } foreach ($root->listChildren() as $child) { if ($group = $this->findGroup($child, $control)) { return $group; } } return null; }
public function pushGroup(RTFGroup $group) { $group->setParent($this); array_push($this->content, $group); }
/** * @param RTFGroup $group */ public function pushGroup(RTFGroup $group) { $group->setParent($this); $this->content[] = $group; }