phpDoctor::getFormatter PHP Method

getFormatter() public method

Creates the formatter and returns it.
public getFormatter ( ) : TextFormatter
return TextFormatter
    public function getFormatter()
    {
        $formatterFile = $this->fixPath($this->_formatterPath) . $this->_formatter . '.php';
        if (is_file($formatterFile)) {
            require_once $formatterFile;
            return new $this->_formatter();
        } else {
            $this->error('Could not find formatter "' . $formatterFile . '"');
            exit;
        }
    }