native_repository = $native_repository; $this->wordpress_repository = $wordpress_repository; } /** * Gets the appropriate indexable repository based on availability. * * @param bool $indexables_available Whether native indexables are available. * * @return Indexable_Repository_Interface The selected indexable repository. */ public function get_repository( bool $indexables_available ): Indexable_Repository_Interface { if ( $indexables_available ) { return $this->native_repository; } return $this->wordpress_repository; } }