ajout ldap
This commit is contained in:
18
nur_src/ldap/syntaxes/cvalues.php
Normal file
18
nur_src/ldap/syntaxes/cvalues.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace nur\ldap\syntaxes;
|
||||
|
||||
use nur\data\types\Metadata;
|
||||
use nur\php\Autogen;
|
||||
|
||||
class cvalues {
|
||||
static function autogen_properties(array $schema): array {
|
||||
$md = Metadata::with($schema);
|
||||
$properties = [];
|
||||
foreach ($md->getKeys() as $key) {
|
||||
$type = $md->getType($key);
|
||||
[$phpType, $returnType] = Autogen::fix_type($type->getPhpType());
|
||||
$properties[] = "$returnType \$$key";
|
||||
}
|
||||
return $properties;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user