pageRestHelperFactory = $pageRestHelperFactory; } /** * Create a ParsoidClient for accessing Parsoid. * * @param string|string[]|false $cookiesToForward * @param Authority|null $performer * * @return ParsoidClient */ public function createParsoidClient( /* Kept for compatibility with other extensions */ $cookiesToForward, ?Authority $performer = null ): ParsoidClient { if ( $performer === null ) { $performer = RequestContext::getMain()->getAuthority(); } return $this->createDirectClient( $performer ); } /** * Create a ParsoidClient for accessing Parsoid. */ private function createDirectClient( Authority $performer ): ParsoidClient { return new DirectParsoidClient( $this->pageRestHelperFactory, $performer ); } }