Skip to content

Commit

Permalink
Add end method
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Oct 16, 2024
1 parent aca34ba commit a954718
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "putyourlightson/datastar-php",
"description": "A set of PHP helper classes for working with Datastar.",
"version": "0.0.1",
"version": "0.0.3",
"type": "library",
"license": "mit",
"require": {
Expand Down
8 changes: 8 additions & 0 deletions src/DatastarResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,12 @@ public function sendEvent(DatastarEvent $event): void
ob_flush();
flush();
}

/**
* Ends the request.
*/
public function end(): void
{
exit();
}
}

0 comments on commit a954718

Please sign in to comment.