/** * Dispatch grouped chunks safely once their end tag happens. * Also notify end of path if selected and not under grouped */ public function after_path($path) { if ($this->path_is_grouped($path)) { // Any accumulated information must be in // currentdata, properly built $data = $this->currentdata[$path]; unset($this->currentdata[$path]); // TODO: If running under DEBUG_DEVELOPER notice about >1MB grouped chunks $this->dispatch_chunk($data); } // Normal notification of path end // Only if path is selected and not child of grouped if ($this->path_is_selected($path) && !$this->grouped_parent_exists($path)) { parent::after_path($path); } }
/** * The parser fires this each time one path has been parsed * * @param string $path xml path which parsing has ended */ public function after_path($path) { // Have finished one grouped path, dispatch it if ($this->path_is_grouped($path)) { // Any accumulated information must be in // currentdata, properly built $data = $this->currentdata[$path]; unset($this->currentdata[$path]); // Always, before dispatching any chunk, send all pending start notifications. $this->process_pending_startend_notifications($path, 'start'); // TODO: If running under DEBUG_DEVELOPER notice about >1MB grouped chunks // And, finally, dispatch it. $this->dispatch_chunk($data); } // Normal notification of path end // Only if path is selected and not child of grouped if (!$this->grouped_parent_exists($path)) { parent::after_path($path); } }