nur-sery/nur_tbin/ldap/update_classes.php

47 lines
1.1 KiB
PHP
Executable File

#!/usr/bin/php
<?php
require(__DIR__.'/../../vendor/autoload.php');
use nur\ldap\AccountObject;
use nur\ldap\app\LdapApplication;
use nur\ldap\app\TLdapApplication;
use nur\ldap\OrganizationalRoleObject;
use nur\ldap\OrganizationalUnitObject;
use nur\ldap\OrganizationObject;
use nur\ldap\PersonObject;
use nur\ldap\scheman;
use nur\ldap\syntaxes\pri\MyValue;
use nur\php\UpdateClassesApp;
UpdateClassesApp::run(new class extends UpdateClassesApp {
use TLdapApplication;
const MAPPINGS = [
"src" => [
"package" => "nur\\ldap\\",
"path" => __DIR__."/../tests",
"classes" => [
AccountObject::class,
OrganizationObject::class,
OrganizationalUnitObject::class,
OrganizationalRoleObject::class,
PersonObject::class,
MyValue::class,
],
],
];
const ARGS = [
"merge" => LdapApplication::ARGS,
];
const LOAD_PARAMS = false;
function main() {
if ($this->config === null) $this->config = __DIR__.'/default.ldapconf';
scheman::init($this->getConn());
parent::main();
}
});