Class: Cli

Command line utility methods.

Usage:

<?php

// default output
Cli::out ('Some info here...');

// print an error message
Cli::out ('Error: Something bad happened.', 'error');

// print a success message
Cli::out ('All is well, captain.', 'success');

// print a block of text
Cli::block ("Options: <info>one, two, three</info>\n");

?>

Properties

public static $colors = array ()

Colors for output.

Methods

public static out ($text, $type = 'default', $newline = ' ')

Print a line of output, with optional color highlighting.

public static block ($text)

Print a block of text, replacing tags with color highlighting, for example:

Options: <info>one, two, three</info>

public static exception_handler ($e)

Used by Controller to print coloured stack traces on the command line.