/** * Get a parser instance with a custom config * * @access public * @param string $name Parser name * @return \PicoFeed\Parser */ public function getParserInstance($name) { require_once __DIR__ . '/Parsers/' . ucfirst($name) . '.php'; $name = '\\PicoFeed\\Parsers\\' . $name; $parser = new $name($this->content, $this->encoding); $parser->setHashAlgo($this->config->getParserHashAlgo()); $parser->setTimezone($this->config->getTimezone()); $parser->setConfig($this->config); return $parser; }