public static function LdapAuthenticationAdminForm::linesToArray in Lightweight Directory Access Protocol (LDAP) 8.4
Helper function to convert array to serialized lines.
Also used in ldap_sso, thus public.
Parameters
string $lines: Serialized lines.
Return value
array Deserialized content.
File
- ldap_authentication/
src/ Form/ LdapAuthenticationAdminForm.php, line 407
Class
- LdapAuthenticationAdminForm
- Provides the form for ldap_authentication options.
Namespace
Drupal\ldap_authentication\FormCode
public static function linesToArray(string $lines) : array {
$lines = trim($lines);
$splitLines = [];
if ($lines) {
$splitLines = preg_split('/[\\n\\r]+/', $lines);
if ($splitLines !== FALSE) {
foreach ($splitLines as $i => $value) {
$splitLines[$i] = trim($value);
}
}
}
return $splitLines;
}