You are here

public function Command::asText in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Command/Command.php \Symfony\Component\Console\Command\Command::asText()

Returns a text representation of the command.

Return value

string A string representing the command

Deprecated

since version 2.3, to be removed in 3.0.

File

vendor/symfony/console/Command/Command.php, line 615

Class

Command
Base class for all commands.

Namespace

Symfony\Component\Console\Command

Code

public function asText() {
  @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
  $descriptor = new TextDescriptor();
  $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true);
  $descriptor
    ->describe($output, $this, array(
    'raw_output' => true,
  ));
  return $output
    ->fetch();
}