Overview

Namespaces

  • Webmozart
    • Console
      • Adapter
      • Api
        • Application
        • Args
          • Format
        • Command
        • Config
        • Event
        • Formatter
        • IO
        • Resolver
      • Args
      • Config
      • Formatter
      • Handler
        • Help
      • IO
        • InputStream
        • OutputStream
      • Process
      • Resolver
      • UI
        • Alignment
        • Component
        • Help
        • Layout
        • Style
      • Util

Classes

  • CallbackHandler
  • DelegatingHandler
  • NullHandler
  • Overview
  • Namespace
  • Class

Class CallbackHandler

Delegates command handling to a callable.

Namespace: Webmozart\Console\Handler
Author: Bernhard Schussek bschussek@gmail.com
Since: 1.0
Located at Handler/CallbackHandler.php
Methods summary
public
# __construct( callable $callback )

Creates the command handler.

Creates the command handler.

The passed callback receives three arguments: * Webmozart\Console\Api\Args\Args $args: The console arguments. * Webmozart\Console\Api\IO\IO $io: The I/O. * Webmozart\Console\Api\Command\Command $command: The executed command.

The callable should return 0 on success and a positive integer on error.

Parameters

$callback

The callback to execute when handling a command.

public
# handle( Webmozart\Console\Api\Args\Args $args, Webmozart\Console\Api\IO\IO $io, Webmozart\Console\Api\Command\Command $command )
Webmozart Console API API documentation generated by ApiGen