Functions Index :: A :: ArraySetValueRegisterNewHandler

[<< up one level]


array :: core


ArraySetValueRegisterNewHandler(string new_handler)


Makes new_handler the new array value-set handler function by assigning it to the ArraySetValueHandler global variable.

Returns the previous value of the variable.

The assignment is made only if the passed argument is callable, as decided by the IsCallable() library function.

Note that this is a global setting affecting immediately all subsequent operations on arrays.


function my_array_set_handler(...) {...}


oldhandler = ArraySetValueRegisterNewHandler("my_array_set_handler")

# perform your custom array operations here


# if afterwards you want the previous behavior, reset the old handler

dummy = ArraySetValueRegisterNewHandler(oldhandler)


[<< top]