protected function parseControls($objectSchema)
{
$controls = [];
if (array_key_exists('controls', $objectSchema)) {
foreach ($objectSchema['controls'] as $control) {
if (!is_array($control)) {
throw new SchemaParserException('The "controls" directive must contain arrays of controls.');
}
$controls[] = new LdapControl(...$control);
}
}
return $controls;
}