protected function getObjectFromSchema(array $schema, $objectType)
{
$objectSchema = null;
foreach ($schema['objects'] as $ldapObject) {
if (array_key_exists('type', $ldapObject) && MBString::strtolower($ldapObject['type']) == MBString::strtolower($objectType)) {
$objectSchema = $ldapObject;
}
}
if (is_null($objectSchema)) {
throw new SchemaParserException(sprintf('Cannot find object type "%s" in schema.', $objectType));
}
return $objectSchema;
}