Changeset 8513
- Timestamp:
- 04/17/08 20:24:08 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/task/generator/sfGenerateTaskTask.class.php
r8493 r8513 29 29 $this->addOptions(array( 30 30 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)', ''), 33 33 )); 34 34 … … 45 45 [./symfony generate:task namespace:name --dir=plugins/myPlugin/lib/task|INFO] 46 46 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]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] 49 49 50 50 You can also specify a description: … … 63 63 $name = isset($taskNameComponents[1]) ? $taskNameComponents[1] : $taskNameComponents[0]; 64 64 $taskClassName = str_replace('-', '', ($namespace ? $namespace.ucfirst($name) : $name)).'Task'; 65 $briefDescription = $options['brief _description'];65 $briefDescription = $options['brief-description']; 66 66 $detailedDescription = <<<HED 67 67 The [$taskName|INFO] task does things. … … 71 71 HED; 72 72 73 if($options['use _database'] != 'true')73 if($options['use-database'] != 'true') 74 74 { 75 75 $content = <<<HED

