Functions Index :: A :: ArraySetValueRegisterNewHandler

[<< up one level]

Module:

array :: core

Definition:

ArraySetValueRegisterNewHandler(string new_handler)

Description:

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.

Examples:

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]

  $notes