Development

Changeset 8513

You must first sign up to be able to contribute.

Changeset 8513

Show
Ignore:
Timestamp:
04/17/08 20:24:08 (6 months ago)
Author:
fabien
Message:

renamed sfGenerateTaskTask option names

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/task/generator/sfGenerateTaskTask.class.php

    r8493 r8513  
    2929    $this->addOptions(array( 
    3030      new sfCommandOption('dir', null, sfCommandOption::PARAMETER_OPTIONAL, 'The directory to create the task in', 'lib/task'), 
    31       new sfCommandOption('use_database', 'db', sfCommandOption::PARAMETER_OPTIONAL, 'Whether the task needs model initialization to access database', 'true'), 
    32       new sfCommandOption('brief_description', 'bd', sfCommandOption::PARAMETER_OPTIONAL, 'A brief task description (appears in task list)', ''), 
     31      new sfCommandOption('use-database', 'db', sfCommandOption::PARAMETER_OPTIONAL, 'Whether the task needs model initialization to access database', 'true'), 
     32      new sfCommandOption('brief-description', 'bd', sfCommandOption::PARAMETER_OPTIONAL, 'A brief task description (appears in task list)', ''), 
    3333    )); 
    3434 
     
    4545  [./symfony generate:task namespace:name --dir=plugins/myPlugin/lib/task|INFO] 
    4646 
    47 If the task doesn't need database access, you can remove the database initialization code with the [use_database|INFO] option: 
    48   [./symfony generate:task namespace:name --use_database=false|INFO] 
     47If the task doesn't need database access, you can remove the database initialization code with the [use-database|INFO] option: 
     48  [./symfony generate:task namespace:name --use-database=false|INFO] 
    4949 
    5050You can also specify a description: 
     
    6363    $name = isset($taskNameComponents[1]) ? $taskNameComponents[1] : $taskNameComponents[0]; 
    6464    $taskClassName = str_replace('-', '', ($namespace ? $namespace.ucfirst($name) : $name)).'Task'; 
    65     $briefDescription = $options['brief_description']; 
     65    $briefDescription = $options['brief-description']; 
    6666    $detailedDescription = <<<HED 
    6767The [$taskName|INFO] task does things. 
     
    7171HED; 
    7272     
    73     if($options['use_database'] != 'true') 
     73    if($options['use-database'] != 'true') 
    7474    { 
    7575      $content = <<<HED