29 parent::__construct();
40 $this->
assert()->isNotIndex($entry->
getId(),$this->id_to_entry_map);
44 $this->id_to_entry_map[$entry->
getId()] = $entry;
53 foreach($entries as $entry){
87 if(array_key_exists ( $id, $this->id_to_entry_map )){
88 return $this->id_to_entry_map[$id];
90 throw $this->f->exception(
Crawler\Exception\CrawlerException::INVALID_ID,$id);
106 array_push($parents,$parent_id);
118 $titles[$parent_id] = $this->
getEntryById($parent_id)->getTitle();
129 foreach($this->
getEntryById($id)->getChildren() as $child){
142 $titles[$parent_id] = $this->
getEntryById($parent_id)->getTitle();
148 return get_object_vars($this);
157 return current($this->id_to_entry_map) !==
false;
164 return key($this->id_to_entry_map);
171 return current($this->id_to_entry_map);
175 next($this->id_to_entry_map);
178 reset($this->id_to_entry_map);
185 return count($this->id_to_entry_map);
An exception for terminatinating execution or to throw for unit testing.
Abstract Entry Part to share some common entry functionality.
Container storing a list of UI Component Entries, can act as Iterator, countable and is serializable.
addEntries(ComponentEntries $entries)
jsonSerialize()
jsonSerialize implementation
__construct()
ComponentEntries constructor.
addEntry(ComponentEntry $entry)
Add and entry, first is always root.
setRootEntryId($root_entry_id)
getDescendantsOfEntry($id)
valid()
Iterator implementations.
getParentsOfEntryTitles($id)
getDescendantsOfEntryTitles($id)
count()
Countable implementations.
Stores Information of UI Components parsed from YAML, examples and less files.