/** * Return a {@link MUNGER} for the given object. * * @param NAMED_OBJECT $obj * @param OBJECT_RENDERER_OPTIONS $options * @return MUNGER * @access private */ protected function _make_formatter($obj, $options) { if ($this->_is_html($options)) { return $obj->html_formatter(); } return $obj->plain_text_formatter(); }
/** * Emit a piece of text as plain text. * Used standard formatting provided by the {@link NAMED_OBJECT::plain_text_formatter()} * and settings from {@link _prepare_formatter()}. * * @param NAMED_OBJECT $obj * @param string $text * @private */ protected function _echo_text_as_plain_text($obj, $text) { if ($text) { $munger = $obj->plain_text_formatter(); $this->_prepare_formatter($munger); $munger->right_margin = $this->_options->right_margin; echo $this->line($munger->transform($text, $obj)); } }