class Doctrine_Task_GenerateYamlModels extends Doctrine_Task (View source)

Doctrine_Task_GenerateFromModels

Properties

$dispatcher from Doctrine_Task
$taskName from Doctrine_Task
$description
$arguments from Doctrine_Task
$requiredArguments
$optionalArguments

Methods

void
__construct($dispatcher = null)

__construct

static string|bool
deriveTaskName(string $className)

Returns the name of the task the specified class would implement

void
notify(string $notification = null)

notify

void
ask()

ask

void
execute()

execute

bool
validate()

validate

void
addArgument(string $name, string $value)

addArgument

mixed
getArgument(string $name, string $default = null)

getArgument

array
getArguments()

getArguments

void
setArguments(array $args)

setArguments

static bool
validateTaskName(string $taskName)

Returns TRUE if the specified task name is valid, or FALSE otherwise

setTaskName(string $taskName)

Sets the name of the task, the name that's used to invoke it through a CLI

string
getTaskName()

getTaskName

string
getDescription()

getDescription

array
getRequiredArguments()

getRequiredArguments

array
getOptionalArguments()

getOptionalArguments

array
getRequiredArgumentsDescriptions()

getRequiredArgumentsDescriptions

array
getOptionalArgumentsDescriptions()

getOptionalArgumentsDescriptions

Details

void __construct($dispatcher = null)

__construct

Since this is an abstract classes that extend this must follow a patter of Doctrine_Task_{TASK_NAME} This is what determines the task name for executing it.

Parameters

$dispatcher

Return Value

void

static string|bool deriveTaskName(string $className)

Returns the name of the task the specified class would implement

N.B. This method does not check if the specified class is actually a Doctrine Task

This is public so we can easily test its reactions to fully-qualified class names, without having to add PHP 5.3-specific test code

Parameters

string $className

Return Value

string|bool

void notify(string $notification = null)

notify

Parameters

string $notification

Return Value

void

void ask()

ask

Return Value

void

void execute()

execute

Override with each task class

Return Value

void

bool validate()

validate

Validates that all required fields are present

Return Value

bool true

void addArgument(string $name, string $value)

addArgument

Parameters

string $name
string $value

Return Value

void

mixed getArgument(string $name, string $default = null)

getArgument

Parameters

string $name
string $default

Return Value

mixed

array getArguments()

getArguments

Return Value

array $arguments

void setArguments(array $args)

setArguments

Parameters

array $args

Return Value

void

static protected bool validateTaskName(string $taskName)

Returns TRUE if the specified task name is valid, or FALSE otherwise

Parameters

string $taskName

Return Value

bool

protected setTaskName(string $taskName)

Sets the name of the task, the name that's used to invoke it through a CLI

Parameters

string $taskName

Exceptions

InvalidArgumentException If the task name is invalid

string getTaskName()

getTaskName

Return Value

string $taskName

string getDescription()

getDescription

Return Value

string $description

array getRequiredArguments()

getRequiredArguments

Return Value

array $requiredArguments

array getOptionalArguments()

getOptionalArguments

Return Value

array $optionalArguments

array getRequiredArgumentsDescriptions()

getRequiredArgumentsDescriptions

Return Value

array $requiredArgumentsDescriptions

array getOptionalArgumentsDescriptions()

getOptionalArgumentsDescriptions

Return Value

array $optionalArgumentsDescriptions