story = $story; } /** * @return \record_adapter */ public function getStory() { return $this->story; } /** * @param RecordView[] $children */ public function setChildren($children) { Assertion::allIsInstanceOf($children, RecordView::class); $this->children = $children instanceof \Traversable ? iterator_to_array($children, false) : array_values($children); } /** * @return RecordView[] */ public function getChildren() { return $this->children; } }