44 return preg_grep(
'/^' . preg_quote($str,
'/') .
'$/i', $array);
52 if ($length === null || $length < 0)
53 $count = $length + count($input);
56 foreach ($input as $key => $value)
60 if ($key === $key_ofs)
63 if ($length !== null && $length >= 0)
65 if (is_array($replacement))
66 foreach($replacement as $r_key => $r_value)
67 $new_array[$r_key] = $r_value;
70 $new_array[$key] = $value;
75 $ret_array[$key] = $value;
77 $new_array[$key] = $value;
96 array($newname => $input[$oldname]));
97 unset($input[$oldname]);
111 if (!is_array($input))
113 if ($unique && in_array($val, $input,
true))
115 array_splice($input, $pos, 0, array(&$val));
126 $input = array_diff($input, array($val));
151 for($i=0; $i<
sizeof($objArray); $i++)
153 $curObj = &$objArray[$i];
154 if(!in_array($curObj->getOID(), $oidList,
true))
156 $oidList[
sizeof($oidList)] = $curObj->getOID();
157 $out[
sizeof($out)] = &$curObj;
178 $listSize =
sizeof($objList);
182 for ($i=0; $i<$listSize; $i++)
184 if ($objList[$i]->getOID() == $oid)
190 $prevOID = $objList[$listSize-1]->getOID();
195 $prevOID = $objList[$i-1]->getOID();
198 if ($i == $listSize-1)
201 $nextOID = $objList[0]->getOID();
206 $nextOID = $objList[$i+1]->getOID();
210 return array($prevOID, $nextOID);
key_array_splice(&$input, $key_ofs, $length=null, $replacement=null)
getPrevNextOIDs($oid, &$objList, $wrap)
array_remove(&$input, &$val)
get_matching_values_i($str, $array)
array_walk_recursive(&$input, $funcname, $userdata="")
array_insert(&$input, $pos, &$val, $unique=true)
key_array_rename(&$input, $oldname, $newname)
ArrayUtil provides support for array manipulation.
array_unique_by_oid($objArray)