Created
April 3, 2022 12:37
-
-
Save crazywhalecc/47b3e53f9604a797578feebd0a0803c1 to your computer and use it in GitHub Desktop.
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 | |
declare(strict_types=1); | |
namespace ZM\Annotation\CQ; | |
use Attribute; | |
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; | |
use Doctrine\Common\Annotations\Annotation\Required; | |
use ZM\Annotation\AnnotationBase; | |
/** | |
* Class CommandArgument | |
* @Annotation | |
* @NamedArgumentConstructor() | |
* @Target("ALL") | |
*/ | |
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_ALL)] | |
class CommandArgument extends AnnotationBase | |
{ | |
/** | |
* @var string | |
* @Required() | |
*/ | |
public $name; | |
/** | |
* @var string | |
*/ | |
public $description = ''; | |
/** | |
* @var bool | |
*/ | |
public $required = false; | |
/** | |
* @var string | |
*/ | |
public $prompt = ''; | |
/** | |
* @var string | |
*/ | |
public $default = ''; | |
public function __construct($name, $description = '', $required = false, $prompt = '', $default = '') | |
{ | |
$this->name = $name; | |
$this->description = $description; | |
$this->required = $required; | |
$this->prompt = $prompt; | |
$this->default = $default; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment