aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-symfony-console/src/command_loader/command_loader_interface.rs
blob: 22ed308daa7c69c533f2b6a447bdd1ee625e44ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! ref: composer/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php

use crate::command::command::Command;

pub trait CommandLoaderInterface: std::fmt::Debug {
    /// Loads a command.
    ///
    /// @throws CommandNotFoundException
    fn get(&self, name: &str) -> std::rc::Rc<std::cell::RefCell<dyn Command>>;

    /// Checks if a command exists.
    fn has(&self, name: &str) -> bool;

    fn get_names(&self) -> Vec<String>;
}