Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 1 | <?php |
| 2 | |
| 3 | namespace Adldap\Models; |
| 4 | |
| 5 | /** |
| 6 | * Class OrganizationalUnit. |
| 7 | * |
| 8 | * Represents an LDAP organizational unit. |
| 9 | */ |
| 10 | class OrganizationalUnit extends Entry |
| 11 | { |
| 12 | use Concerns\HasDescription; |
| 13 | |
| 14 | /** |
| 15 | * Retrieves the organization units OU attribute. |
| 16 | * |
| 17 | * @return string |
| 18 | */ |
| 19 | public function getOu() |
| 20 | { |
| 21 | return $this->getFirstAttribute($this->schema->organizationalUnitShort()); |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * {@inheritdoc} |
| 26 | */ |
| 27 | protected function getCreatableDn() |
| 28 | { |
| 29 | return $this->getDnBuilder()->addOU($this->getOu()); |
| 30 | } |
| 31 | } |