芝麻web文件管理V1.00
编辑当前文件:/home/elegucvf/public_html/src/dashboard/domain/endpoint/endpoint-list.php
$endpoints */ private $endpoints = []; /** * Adds an endpoint to the list. * * @param Endpoint_Interface $endpoint An endpoint. * * @return void */ public function add_endpoint( Endpoint_Interface $endpoint ): void { $this->endpoints[] = $endpoint; } /** * Converts the list to an array. * * @return array
The array of endpoints. */ public function to_array(): array { $result = []; foreach ( $this->endpoints as $endpoint ) { $result[ $endpoint->get_name() ] = $endpoint->get_url(); } return $result; } }