-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
97 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
Classes/Service/RegisterShutdownFunction/RegisterShutdownFunction.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Kanti\ServerTiming\Service\RegisterShutdownFunction; | ||
|
||
final class RegisterShutdownFunction implements RegisterShutdownFunctionInterface | ||
{ | ||
public function register(callable $callback): void | ||
{ | ||
register_shutdown_function($callback); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
Classes/Service/RegisterShutdownFunction/RegisterShutdownFunctionInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Kanti\ServerTiming\Service\RegisterShutdownFunction; | ||
|
||
interface RegisterShutdownFunctionInterface | ||
{ | ||
public function register(callable $callback): void; | ||
} |
15 changes: 15 additions & 0 deletions
15
Classes/Service/RegisterShutdownFunction/RegisterShutdownFunctionNoop.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Kanti\ServerTiming\Service\RegisterShutdownFunction; | ||
|
||
final class RegisterShutdownFunctionNoop implements RegisterShutdownFunctionInterface | ||
{ | ||
public int $callCount = 0; | ||
|
||
public function register(callable $callback): void | ||
{ | ||
$this->callCount++; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters