public static function register($command, $callback)
    {
        if (!is_string($command) || strlen($command) < 1) {
            throw new BadMethodCallException('Parameter command is not a valid string');
        }
        if (!is_callable($callback)) {
            throw new BadMethodCallException('Parameter callback is not a valid callback');
        }

        $instance = self::getInstance();
        
        $instance->commands[$command] = $callback;
        
        return $instance;
    }
public static function register($command, $callback)
    {
        if (!is_string($command) || strlen($command) < 1) {
            throw new BadMethodCallException('Parameter command is not a valid string');
        }
        if (!is_callable($callback)) {
            throw new BadMethodCallException('Parameter callback is not a valid callback');
        }

        $instance = self::getInstance();
        
        $instance->commands[$command] = $callback;
        
        return $instance;
    }
public static function register ( $ command , $ callback ) { if ( ! is_string ( $ command ) || strlen ( $ command ) < 1 ) { throw new BadMethodCallException ( 'Parameter command is not a valid string' ) ; } if ( ! is_callable ( $ callback ) ) { throw new BadMethodCallException ( 'Parameter callback is not a valid callback' ) ; } $ instance = self :: getInstance ( ) ; $ instance -> commands [ $ command ] = $ callback ; return $ instance ; }
register a image command

@param  string $command
@param  callable $callback
@return self
register a image command