function apachesolr_flatten_documents_array in Apache Solr Search 6.2
Same name and namespace in other branches
- 8 apachesolr.module \apachesolr_flatten_documents_array()
- 6.3 apachesolr.module \apachesolr_flatten_documents_array()
- 7 apachesolr.module \apachesolr_flatten_documents_array()
Function to flatten documents array recursively.
Parameters
array $documents: The array of documents being indexed.
array &$tmp: A container variable that will contain the flattened array.
1 call to apachesolr_flatten_documents_array()
- apachesolr_index_nodes in ./
apachesolr.module - Handles the indexing of nodes.
File
- ./
apachesolr.module, line 540 - Integration with the Apache Solr search application.
Code
function apachesolr_flatten_documents_array($documents, &$tmp) {
foreach ($documents as $index => $item) {
if (is_array($item)) {
apachesolr_flatten_documents_array($item, $tmp);
}
else {
$tmp[] = $item;
}
}
}