32 lines
811 B
PHP
32 lines
811 B
PHP
|
<?php
|
||
|
namespace nur\ldap;
|
||
|
|
||
|
use nur\ldap\schemas\SchemaManager;
|
||
|
|
||
|
/**
|
||
|
* Class scheman: gestionnaire de schéma global partagé
|
||
|
*
|
||
|
* Cette classe ne peut être utilisée correctement que pour une seule instance
|
||
|
* de {@link LdapConn}
|
||
|
*/
|
||
|
class scheman {
|
||
|
/** @var SchemaManager */
|
||
|
protected static $scheman;
|
||
|
|
||
|
static function init(LdapConn $conn, ?array $overrides=null): void {
|
||
|
self::$scheman = new SchemaManager($conn, $overrides);
|
||
|
}
|
||
|
|
||
|
static function autogen_schema(array $objectClasses): array {
|
||
|
return self::$scheman->autogenSchema($objectClasses);
|
||
|
}
|
||
|
|
||
|
static function autogen_properties(array $schema): array {
|
||
|
return self::$scheman->autogenProperties($schema);
|
||
|
}
|
||
|
|
||
|
static function autogen_methods(array $schema): array {
|
||
|
return self::$scheman->autogenMethods($schema);
|
||
|
}
|
||
|
}
|