mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-12 11:15:34 +08:00
add @CommandArgument annotation
* add @CommandArgument and relevant event changes * fix unknown bug * remove relative constant for CommandArgument
This commit is contained in:
30
src/ZM/Entity/InputArguments.php
Normal file
30
src/ZM/Entity/InputArguments.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Entity;
|
||||
|
||||
class InputArguments
|
||||
{
|
||||
private $arguments;
|
||||
|
||||
public function __construct(array $arguments)
|
||||
{
|
||||
$this->arguments = $arguments;
|
||||
}
|
||||
|
||||
public function getArguments(): array
|
||||
{
|
||||
return $this->arguments;
|
||||
}
|
||||
|
||||
public function getArgument($name)
|
||||
{
|
||||
return $this->arguments[$name] ?? null;
|
||||
}
|
||||
|
||||
public function get($name)
|
||||
{
|
||||
return $this->getArgument($name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user