nur-sery/nur_tests/b/params/impl/MyParametrable.php

92 lines
2.1 KiB
PHP

<?php
namespace nur\b\params\impl;
use nur\b\params\Parametrable;
use nur\b\params\Tparametrable;
/**
* Class MyParametrable: exemple d'implémentation de Parametrable
*
* --autogen-properties-and-methods--
* @method string|null getName()
* @method bool isActive()
* @method int getNumber()
* @method string|null setName(?string $value)
* @method bool setActive(bool $value)
* @method int setNumber(int $value)
* @method string|null setMasked(?string $value)
*/
class MyParametrable extends Parametrable {
use Tparametrable;
const PARAMETRABLE_PARAMS_SCHEMA = [
"name" => "?string",
"active" => "bool",
"number" => "int",
"masked" => "?string",
];
/** @var string */
protected $ppName;
/** @var bool */
protected $ppActive;
protected $ppNumber;
function pp_setNumber(int $number): void {
$this->ppNumber = $number + 10;
}
/** @var string */
protected $masked;
function pp_setMasked(string $masked): void {
$this->masked = $masked;
}
function whatIsMasked(): ?string {
return $this->masked;
}
#############################################################################
const _AUTOGEN_CONSTS = [
"" => [self::class, "_AUTOGEN_CONSTS"],
];
const _AUTOGEN_LITERALS = /*autogen*/[
[
\nur\b\params\parametrable_utils::class,
'\\nur\\b\\params\\parametrable_utils::class',
],
[
self::PARAMETRABLE_PARAMS_SCHEMA,
'self::PARAMETRABLE_PARAMS_SCHEMA',
],
];
const _AUTOGEN_METHODS = /*autogen*/[
[
\nur\b\params\parametrable_utils::class,
'_autogen_methods_getters',
self::PARAMETRABLE_PARAMS_SCHEMA,
],
[
\nur\b\params\parametrable_utils::class,
'_autogen_methods_setters',
self::PARAMETRABLE_PARAMS_SCHEMA,
],
];
const _AUTO_GETTERS = /*autogen*/[
'getName' => 'name',
'isActive' => 'active',
'getNumber' => 'number',
'getMasked' => 'masked',
];
const _AUTO_SETTERS = /*autogen*/[
'setName' => 'name',
'setActive' => 'active',
'setNumber' => 'number',
'setMasked' => 'masked',
];
#--autogen-dynamic--
}