PMCORE-4013 Wizard trigger: is using a old library thirdparty/wizard please research to use a new or Reflection

This commit is contained in:
Roly Gutierrez
2022-11-17 15:34:12 -04:00
parent 8640a0b209
commit 903a707561
11 changed files with 683 additions and 563 deletions

View File

@@ -0,0 +1,69 @@
<?php
namespace ProcessMaker\PHPReflectionClass;
/**
* Structure for the metadata of the class method.
*/
class MethodStructure
{
/**
* Params property.
* @var array
*/
public $params;
/**
* Information property.
* @var array
*/
public $info;
/**
* Constructor, runs when new object instance is created, sets name of the method.
* @param string $name
* @return void
*/
public function __construct(string $name)
{
$this->info = [];
$this->params = [];
$this->setInfo("name", $name);
}
/**
* Get value of a property by name.
* @param string $name
* @return mixed
*/
public function getInfo(string $name)
{
if (array_key_exists($name, $this->info)) {
return $this->info[$name];
} else {
return false;
}
}
/**
* Sets a property with supplied name to a supplied value.
* @param string $name
* @param string $value
* @return void
*/
public function setInfo(string $name, string $value): void
{
$this->info[$name] = $value;
}
/**
* Sets a parameter with supplied name and value.
* @param string $name
* @param string $value
* @return void
*/
public function setParam(string $name, string $value): void
{
$this->params[$name] = $value;
}
}