PHP 8.2.31
Preview: endpoints-repository.php Size: 843 B
/home/nshryvcy/blissfulnepal.com/wp-content/plugins/wordpress-seo/src/routes/endpoint/endpoints-repository.php

<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\Routes\Endpoint;

/**
 * Repository for endpoints.
 */
class Endpoints_Repository {

	/**
	 * Holds the endpoints.
	 *
	 * @var array<Endpoint_Interface>
	 */
	private $endpoints;

	/**
	 * Constructs the repository.
	 *
	 * @param Endpoint_Interface ...$endpoints The endpoints to add to the repository.
	 */
	public function __construct( Endpoint_Interface ...$endpoints ) {
		$this->endpoints = $endpoints;
	}

	/**
	 * Creates a list with all endpoints.
	 *
	 * @return Endpoint_List The list with all endpoints.
	 */
	public function get_all_endpoints(): Endpoint_List {
		$list = new Endpoint_List();
		foreach ( $this->endpoints as $endpoint ) {
			$list->add_endpoint( $endpoint );
		}

		return $list;
	}
}

Directory Contents

Dirs: 0 × Files: 3

Name Size Perms Modified Actions
451 B lrw-r--r-- 2026-06-03 14:57:42
Edit Download
1.63 KB lrw-r--r-- 2026-06-03 14:57:42
Edit Download
843 B lrw-r--r-- 2026-06-03 14:57:42
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).