Skip to content

Commit

Permalink
Add new internal GeneratesDocumentationSearchIndex::generate method
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 13, 2023
1 parent 7eba136 commit abac409
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ public static function handle(): string
return $service->path;
}

/**
* Generate the search index return it as a string.
*/
public static function generate(): string
{
$service = new static();
$service->run();

return $service->index->toJson();
}

protected function __construct()
{
$this->index = new Collection();
Expand Down

0 comments on commit abac409

Please sign in to comment.