réorganiser les classes de ref
This commit is contained in:
parent
cf867765d1
commit
80475f044c
@ -9,7 +9,7 @@ class varray {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static function ensuren(&$array): void {
|
static function ensuren(&$array): void {
|
||||||
if ($array !== null) varray::ensure($array);
|
if ($array !== null) self::ensure($array);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function with($value): array {
|
static function with($value): array {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace nulib\ref\schema;
|
namespace nulib\ref;
|
||||||
|
|
||||||
class ref_analyze {
|
class ref_analyze {
|
||||||
/** @var int résultat de l'analyse: valeur inexistante */
|
/** @var int résultat de l'analyse: valeur inexistante */
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace nulib\ref\cli;
|
namespace nulib\ref;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ref_args: référence du format des arguments pour une application
|
* Class ref_args: référence du format des arguments pour une application
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace nulib\ref\schema;
|
namespace nulib\ref;
|
||||||
|
|
||||||
class ref_input {
|
class ref_input {
|
||||||
const ACCESS_AUTO = 0, ACCESS_KEY = 1, ACCESS_PROPERTY = 2;
|
const ACCESS_AUTO = 0, ACCESS_KEY = 1, ACCESS_PROPERTY = 2;
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace nulib\ref\schema;
|
namespace nulib\ref;
|
||||||
|
|
||||||
class ref_schema {
|
class ref_schema {
|
||||||
/** @var array schéma des natures de schéma */
|
/** @var array schéma des natures de schéma */
|
||||||
27
php/src/ref/ref_types.php
Normal file
27
php/src/ref/ref_types.php
Normal 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",
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -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",
|
|
||||||
];
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user