src/FelixOnline/Base/CliGlue.php
public function mapRoute($method, $path, $class, $classMethod, $middleware = false)
    {
        if ($method == 'help') {
            throw new GlueInternalException(
                'Do not map "help" as this is internally reserved.',
                $method,
                $class,
                $classMethod
            );
        }

        if ($middleware) {
            throw new InternalException(
                'Middleware is not supported for CLI'
            );
        }

        // Check that handler exists
        if (!class_exists($class)) { // FIXME: implements
            throw new GlueInternalException(
                'Class does not exist.',
                $method,
                $class,
                $classMethod
            );
        }

        $obj = new $class;
        if (!method_exists($obj, $classMethod)) {
            throw new GlueMethodException(
                'Method does not exist.',
                $method,
                $class,
                $classMethod
            );
        }

        $this->routes[$method] = array(
            'Command' => $method, // Defined here too for help
            'Description' => $path,
            'Class' => $class,
            'Method' => $classMethod
        );
    }
public function mapRoute($method, $path, $class, $classMethod, $middleware = false)
    {
        if ($method == 'help') {
            throw new GlueInternalException(
                'Do not map "help" as this is internally reserved.',
                $method,
                $class,
                $classMethod
            );
        }

        if ($middleware) {
            throw new InternalException(
                'Middleware is not supported for CLI'
            );
        }

        // Check that handler exists
        if (!class_exists($class)) { // FIXME: implements
            throw new GlueInternalException(
                'Class does not exist.',
                $method,
                $class,
                $classMethod
            );
        }

        $obj = new $class;
        if (!method_exists($obj, $classMethod)) {
            throw new GlueMethodException(
                'Method does not exist.',
                $method,
                $class,
                $classMethod
            );
        }

        $this->routes[$method] = array(
            'Command' => $method, // Defined here too for help
            'Description' => $path,
            'Class' => $class,
            'Method' => $classMethod
        );
    }
path is the command information (e.g. Add a user)