53 lines
1.4 KiB
PHP
53 lines
1.4 KiB
PHP
|
<?php
|
||
|
namespace nur\ref;
|
||
|
|
||
|
use nur\b\coll\FancyArray;
|
||
|
use nur\b\coll\TGenericArray;
|
||
|
use nur\php\Autogen;
|
||
|
|
||
|
/**
|
||
|
* Class ref_row: un exemple d'implémention des champs et méthodes automatiques
|
||
|
* basées sur FancyArray
|
||
|
*/
|
||
|
class ref_row extends FancyArray {
|
||
|
use TGenericArray;
|
||
|
|
||
|
const SCHEMA = [
|
||
|
#...
|
||
|
];
|
||
|
|
||
|
#############################################################################
|
||
|
const _AUTOGEN_CONSTS = [
|
||
|
"_AUTO_GETTERS",
|
||
|
"_AUTO_SETTERS",
|
||
|
"_AUTO_DELETERS",
|
||
|
"_AUTO_CI_GETTERS",
|
||
|
"_AUTO_CI_SETTERS",
|
||
|
];
|
||
|
const _AUTOGEN_METHODS = [
|
||
|
[Autogen::class, "auto_getters_methods", self::SCHEMA],
|
||
|
[Autogen::class, "auto_setters_methods", self::SCHEMA],
|
||
|
[Autogen::class, "auto_deleters_methods", self::SCHEMA],
|
||
|
];
|
||
|
static function _AUTOGEN__AUTO_GETTERS(): array {
|
||
|
return Autogen::auto_getters(self::SCHEMA);
|
||
|
}
|
||
|
static function _AUTOGEN__AUTO_SETTERS(): array {
|
||
|
return Autogen::auto_setters(self::SCHEMA);
|
||
|
}
|
||
|
static function _AUTOGEN__AUTO_DELETERS(): array {
|
||
|
return Autogen::auto_deleters(self::SCHEMA);
|
||
|
}
|
||
|
static function _AUTOGEN__AUTO_CI_GETTERS(): array {
|
||
|
return Autogen::auto_ci_getters(self::SCHEMA);
|
||
|
}
|
||
|
static function _AUTOGEN__AUTO_CI_SETTERS(): array {
|
||
|
return Autogen::auto_ci_setters(self::SCHEMA);
|
||
|
}
|
||
|
const _AUTO_GETTERS = null;
|
||
|
const _AUTO_SETTERS = null;
|
||
|
const _AUTO_DELETERS = null;
|
||
|
const _AUTO_CI_GETTERS = null;
|
||
|
const _AUTO_CI_SETTERS = null;
|
||
|
}
|