composer package updates
[openemr.git] / vendor / adldap2 / adldap2 / docs / models / ou.md
blobec473b1a19b503736a6678b84f2920d89a96a979
1 # The OrganizationalUnit Model
3 The OrganizationalUnit model extends from the base `Adldap\Models\Model` class and contains
4 no specific methods / attributes that are limited to it.
6 ## Creation
8 ```php
9 // Adldap\Models\OrganizationalUnit
10 $ou = $provider->make()->ou([
11     'name' => 'Workstation Computers',
12 ]);
14 // Generate the OU's DN through the DN Builder:
16 $dn = $ou->getDnBuilder();
18 $dn->addOu('Workstation Computers');
20 $ou->setDn($dn);
22 // Or set the DN manually:
24 $ou->setDn('ou=Workstation Computers,dc=test,dc=local,dc=com');
26 $ou->save();
27 ```