réorganiser les classes de ref

This commit is contained in:
Jephté Clain 2025-10-21 12:26:04 +04:00
parent cf867765d1
commit 80475f044c
7 changed files with 32 additions and 16 deletions

View File

@ -9,7 +9,7 @@ class varray {
}
static function ensuren(&$array): void {
if ($array !== null) varray::ensure($array);
if ($array !== null) self::ensure($array);
}
static function with($value): array {

View File

@ -1,5 +1,5 @@
<?php
namespace nulib\ref\schema;
namespace nulib\ref;
class ref_analyze {
/** @var int résultat de l'analyse: valeur inexistante */

View File

@ -1,5 +1,5 @@
<?php
namespace nulib\ref\cli;
namespace nulib\ref;
/**
* Class ref_args: référence du format des arguments pour une application

View File

@ -1,5 +1,5 @@
<?php
namespace nulib\ref\schema;
namespace nulib\ref;
class ref_input {
const ACCESS_AUTO = 0, ACCESS_KEY = 1, ACCESS_PROPERTY = 2;

View File

@ -1,5 +1,5 @@
<?php
namespace nulib\ref\schema;
namespace nulib\ref;
class ref_schema {
/** @var array schéma des natures de schéma */

27
php/src/ref/ref_types.php Normal file
View File

@ -0,0 +1,27 @@
<?php
namespace nulib\ref;
class ref_types {
/** types simples valides */
const TYPES = [
"rawstring", "string", "text",
"bool",
"int",
"float",
"array",
"func",
"raw",
"mixed",
"key", "pkey",
"content",
"datetime", "date", "time",
];
/** aliases pour les types simples */
const ALIASES = [
"boolean" => "bool",
"integer" => "int",
"flt" => "float", "double" => "float", "dbl" => "float",
"function" => "func", "callable" => "func",
];
}

View File

@ -1,11 +0,0 @@
<?php
namespace nulib\ref\schema;
class ref_types {
const ALIASES = [
"boolean" => "bool",
"integer" => "int",
"flt" => "float", "double" => "float", "dbl" => "float",
"func" => "callable", "function" => "callable",
];
}