/** * Determines the tag builder to use for this object * @return IOpenGraphObjectBuilder */ protected function getTagBuilder() { // Determine type $type = $this->owner->getOGType(); // Case for non-types if (empty($type)) { return null; } // Determine type, if configured $prototype = OpenGraph::get_prototype($type); if (!empty($prototype['tagbuilder'])) { $class = $prototype['tagbuilder']; } else { $class = OpenGraph::get_default_tagbuilder(); } // Construct instance from type return new $class(); }