aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/symfony/console/console_events.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-12 01:01:35 +0900
committernsfisis <nsfisis@gmail.com>2026-06-12 01:01:43 +0900
commit1e44f5723e4c0e0903d00a61f254901e612fe5e1 (patch)
tree9c2e1eec364bbf6418a4072ee7767b04c3df0297 /crates/shirabe-external-packages/src/symfony/console/console_events.rs
parentddf0a624145b618c05c2ee47414545b99b685f37 (diff)
downloadphp-shirabe-1e44f5723e4c0e0903d00a61f254901e612fe5e1.tar.gz
php-shirabe-1e44f5723e4c0e0903d00a61f254901e612fe5e1.tar.zst
php-shirabe-1e44f5723e4c0e0903d00a61f254901e612fe5e1.zip
feat(symfony-console): port Symfony Console and make the workspace compile
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/console/console_events.rs')
-rw-r--r--crates/shirabe-external-packages/src/symfony/console/console_events.rs44
1 files changed, 44 insertions, 0 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/console/console_events.rs b/crates/shirabe-external-packages/src/symfony/console/console_events.rs
new file mode 100644
index 0000000..796f8b4
--- /dev/null
+++ b/crates/shirabe-external-packages/src/symfony/console/console_events.rs
@@ -0,0 +1,44 @@
+/// Contains all events dispatched by an Application.
+#[derive(Debug)]
+pub struct ConsoleEvents;
+
+impl ConsoleEvents {
+ /// The COMMAND event allows you to attach listeners before any command is
+ /// executed by the console. It also allows you to modify the command, input and output
+ /// before they are handed to the command.
+ pub const COMMAND: &'static str = "console.command";
+
+ /// The SIGNAL event allows you to perform some actions
+ /// after the command execution was interrupted.
+ pub const SIGNAL: &'static str = "console.signal";
+
+ /// The TERMINATE event allows you to attach listeners after a command is
+ /// executed by the console.
+ pub const TERMINATE: &'static str = "console.terminate";
+
+ /// The ERROR event occurs when an uncaught exception or error appears.
+ ///
+ /// This event allows you to deal with the exception/error or
+ /// to modify the thrown exception.
+ pub const ERROR: &'static str = "console.error";
+
+ /// Event aliases. These aliases can be consumed by RegisterListenersPass.
+ pub const ALIASES: &'static [(&'static str, &'static str)] = &[
+ (
+ "Symfony\\Component\\Console\\Event\\ConsoleCommandEvent",
+ Self::COMMAND,
+ ),
+ (
+ "Symfony\\Component\\Console\\Event\\ConsoleErrorEvent",
+ Self::ERROR,
+ ),
+ (
+ "Symfony\\Component\\Console\\Event\\ConsoleSignalEvent",
+ Self::SIGNAL,
+ ),
+ (
+ "Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent",
+ Self::TERMINATE,
+ ),
+ ];
+}