REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.09 KB
Close
//opt/alt/tests/alt-php85-pecl-mongodb_2.1.4-3.el8/utils/observer.php
Text
Base64
<?php use MongoDB\Driver\Monitoring\CommandFailedEvent; use MongoDB\Driver\Monitoring\CommandStartedEvent; use MongoDB\Driver\Monitoring\CommandSucceededEvent; use MongoDB\Driver\Monitoring\CommandSubscriber; /** * Observes command documents using the driver's monitoring API. */ class CommandObserver implements CommandSubscriber { private $commands = []; public function observe(callable $execution, callable $commandCallback) { $this->commands = []; \MongoDB\Driver\Monitoring\addSubscriber($this); try { call_user_func($execution); } finally { \MongoDB\Driver\Monitoring\removeSubscriber($this); foreach ($this->commands as $command) { call_user_func($commandCallback, $command); } } } public function commandStarted(CommandStartedEvent $event): void { $this->commands[] = $event->getCommand(); } public function commandSucceeded(CommandSucceededEvent $event): void { } public function commandFailed(CommandFailedEvent $event): void { } } ?>
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
basic-skipif.inc
795 B
lrw-r--r--
2025-12-23 22:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
basic.inc
855 B
lrw-r--r--
2025-12-23 22:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
classes.inc
1.55 KB
lrw-r--r--
2025-12-23 22:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
observer.php
1.09 KB
lrw-r--r--
2025-12-23 22:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PHONGO-FIXTURES.json.gz
73.94 KB
lrw-r--r--
2025-12-23 22:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
skipif.php
12.34 KB
lrw-r--r--
2025-12-23 22:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
tools.php
24.34 KB
lrw-r--r--
2025-12-23 22:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).