Created
February 6, 2012 21:48
-
-
Save madflow/1755133 to your computer and use it in GitHub Desktop.
Add Argument
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add an available argument to the list | |
* @param $name | |
* @param string $type | |
* @param string $description | |
* @param bool $required | |
*/ | |
public function addArgument($name, $type = self::ARG_TYPE_MIXED, $description = '', $required = false) | |
{ | |
$argument = new Custom_TaskArgument(); | |
$argument->setName($name); | |
$argument->setType($type); | |
$argument->setDescription($description); | |
$argument->setRequired($required); | |
if (true === $required) | |
$this->addRequiredArgument($name); | |
$this->arguments[$name] = $argument; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment