public function handleKeyword($tag, $value, $staging) { // Check that it's an authorized keyword for the domain encountered, if not do not create keyword... if (!in_array($tag, array_keys($this->known_keywords))) { return; } if ($this->known_keywords[$tag] != '') { $this->level_name = $this->known_keywords[$tag]; if ($value != '') { if (!$this->catalogue_parent) { $this->catalogue_parent = new Hstore(); } $this->catalogue_parent[$this->known_keywords[$tag]] = $value; $staging['taxon_parents'] = $this->catalogue_parent->export(); } elseif ($value === "") { return; } } $keyword = new ClassificationKeywords(); $keyword->fromArray(array('keyword_type' => $tag, 'keyword' => $value)); $this->scientificName .= "{$value} "; $staging->addRelated($keyword); }