TYPO3 CMS  TYPO3_6-2
CommandArgumentDefinition.php
Go to the documentation of this file.
1 <?php
3 
22 
26  protected $name = '';
27 
31  protected $required = FALSE;
32 
36  protected $description = '';
37 
45  public function __construct($name, $required, $description) {
46  $this->name = $name;
47  $this->required = $required;
48  $this->description = $description;
49  }
50 
54  public function getName() {
55  return $this->name;
56  }
57 
63  public function getDashedName() {
64  $dashedName = ucfirst($this->name);
65  $dashedName = preg_replace('/([A-Z][a-z0-9]+)/', '$1-', $dashedName);
66  return '--' . strtolower(substr($dashedName, 0, -1));
67  }
68 
72  public function getDescription() {
73  return $this->description;
74  }
75 
79  public function isRequired() {
80  return $this->required;
81  }
82 }