$this->get_openai_endpoints(), 'QUADLAYERS_AICP_API_SERVICES_PEXELS_ROUTES' => $this->get_pexels_endpoints(), ) ); } private function get_openai_endpoints() { $endpoints_paths = array(); $openai_routes_library = Services_OpenAI_Routes_Library::instance(); $openai_endpoints = $openai_routes_library->get_routes(); foreach ( $openai_endpoints as $endpoint ) { $path = $endpoint::get_rest_route(); if ( ! isset( $endpoints_paths[ $path ] ) ) { $endpoints_paths[ $path ] = $endpoint::get_rest_path(); } } return $endpoints_paths; } private function get_pexels_endpoints() { $endpoints_paths = array(); $pexels_routes_library = Services_Pexels_Routes_Library::instance(); $pexels_endpoints = $pexels_routes_library->get_routes(); foreach ( $pexels_endpoints as $endpoint ) { $path = $endpoint::get_rest_route(); if ( ! isset( $endpoints_paths[ $path ] ) ) { $endpoints_paths[ $path ] = $endpoint::get_rest_path(); } } return $endpoints_paths; } public static function instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } }