["?string", null, "identifiant"], "name" => ["?string", null, "nom de l'élément"], "value" => ["?string", null, "valeur de l'élément"], "attrs" => ["?array", null, "attributs HTML génériques"], ]; function __construct(Form $form, ?array $params=null) { $this->form = $form; [$params, $attrs] = $this->splitParametrableParams($params); if ($attrs) A::merge($params["attrs"], $attrs); $this->initParametrableParams($params); if (static::AUTOID) { base::update_n($this->ppId, $this->ppName); } } /** @var Form */ protected $form; /** @var ?string */ protected $ppId; /** @var ?string */ protected $ppName; /** @var array|string */ protected $ppValue; /** @var ?array */ protected $ppAttrs; abstract function getControl(): array; function print(): void { vo::write($this->getControl()); } }