Phrozn/Runner/CommandLine/Callback/Base.php
private function getRealCommandName($file)
    {
        $iter = CommandLine\Commands::getInstance();
        $commands = array();
        foreach ($iter as $name => $data) {
            $commands[$name] = $data;
        }
        ksort($commands);

        if (!file_exists($file)) {
            foreach ($commands as $command) {
                if (is_array($command["command"]["aliases"]) && in_array($file, $command["command"]["aliases"])) {
                    return $command["command"]["name"];
                }
            }
        }

        return $file;
    }
private function getRealCommandName($file)
    {
        $iter = CommandLine\Commands::getInstance();
        $commands = array();
        foreach ($iter as $name => $data) {
            $commands[$name] = $data;
        }
        ksort($commands);

        if (!file_exists($file)) {
            foreach ($commands as $command) {
                if (is_array($command["command"]["aliases"]) && in_array($file, $command["command"]["aliases"])) {
                    return $command["command"]["name"];
                }
            }
        }

        return $file;
    }
private function getRealCommandName ( $ file ) { $ iter = CommandLine \ Commands :: getInstance ( ) ; $ commands = array ( ) ; foreach ( $ iter as $ name => $ data ) { $ commands [ $ name ] = $ data ; } ksort ( $ commands ) ; if ( ! file_exists ( $ file ) ) { foreach ( $ commands as $ command ) { if ( is_array ( $ command [ "command" ] [ "aliases" ] ) && in_array ( $ file , $ command [ "command" ] [ "aliases" ] ) ) { return $ command [ "command" ] [ "name" ] ; } } } return $ file ; }
Search if an alias exists for this command

@param string $file Command name (could be an alias)
@return string The real command file name
Search if an alias exists for this command