You are currently viewing the 1.0 branch api documentation. Switch to 1.1

1.0 Doctrine_Cli

Doctrine Cli

Command line interface class Interface for easily executing Doctrine_Task classes from a command line interface

Method Summary

Returns Name Description
array getLoadedTasks
array loadTasks
notify
notifyException
array prepareArgs
printTasks
run
string _getTaskClassFromArgs
_run
__construct

Method Details

  • (array) getLoadedTasks()

    Get array of all the Doctrine_Task child classes that are loaded


  • $directory Can be a string path or array of paths

    (array) loadTasks($directory = null)

    Load tasks from the passed directory. If no directory is given it looks in the default Doctrine/Task folder for the core tasks.

    Doctrine_Cli


  • $notification The notification message
    $style Style to format the notification with(INFO, ERROR)

    notify($notification = null, $style = 'HEADER')

    Notify the formatter of a message


  • notifyException((Exception) $exception)

    Notify the formatter of an exception


  • $args Array of raw arguments

    (array) prepareArgs($args)

    Prepare the raw arguments for execution. Combines with the required and optional argument list in order to determine a complete array of arguments for the task

    Doctrine_Cli


  • printTasks($task = null, $full = false)

    Prints an index of all the available tasks in the CLI instance


  • run($args)

    Public function to run the loaded task with the passed arguments

    throws new Doctrine_Cli_Exception


  • $args Array of arguments from the cli

    (string) _getTaskClassFromArgs($args)

    Get the name of the task class based on the first argument which is always the task name. Do some inflection to determine the class name

    Doctrine_Cli


  • $args Array of arguments for this task being executed

    _run($args)

    Run the actual task execution with the passed arguments

    throws Doctrine_Cli_Exception $e


  • __construct($config = array())