Skip to content
Snippets Groups Projects
Commit 6b3d1809 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Add new utility function arrayize()

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1164 44740490-163a-0410-bde0-09ae8108e29a
parent ed021918
No related branches found
No related tags found
No related merge requests found
...@@ -1658,6 +1658,17 @@ class SimpleSAML_Utilities { ...@@ -1658,6 +1658,17 @@ class SimpleSAML_Utilities {
return $doc->saveXML($root); return $doc->saveXML($root);
} }
/*
* Input is single value or array, returns an array.
*/
public static function arrayize($data) {
if (is_array($data)) {
return $data;
} else {
return array($data);
}
}
} }
?> ?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment