public function select_fx($fx, $get_array = false)
{
$auto_unlocker = NULL;
if (!$this->mutex->get_access_read($auto_unlocker)) {
return false;
}
$map = $this->mem_object->read('map');
$arr = array();
foreach ($map as $index => &$zs) {
if (!$zs[self::map_key_serialized]) {
continue;
}
$s = $this->read($index);
if (empty($s)) {
continue;
}
if ($fx($s, $index) === true) {
if (!$get_array) {
return $s;
} else {
$arr[$index] = $s;
}
}
}
if (!$get_array || empty($arr)) {
return false;
} else {
return $arr;
}
}