name = $name; $this->label = $label; $this->rest_url = $rest_url; } /** * Returns the name of the taxonomy. * * @return string The name of the taxonomy. */ public function get_name(): string { return $this->name; } /** * Parses the taxonomy to the expected key value representation. * * @return array> The taxonomy presented as the expected key value representation. */ public function to_array(): array { return [ 'name' => $this->name, 'label' => $this->label, 'links' => [ 'search' => $this->rest_url, ], ]; } }