public function __construct($content, $factory = null, $offset = 0) { if (null === $factory) { $this->factory = new Factory(); } else { $this->factory = $factory; } $this->offset = $offset; $this->parse($content); }