public static function addCallback($hook, $order, $function) {
    $callback = array($order, $function);
    if (!isset(Hook::$hooks[$hook])) {
      Hook::$hooks[$hook] = array();
    }
    Hook::$hooks[$hook][] = $callback;
    uasort(Hook::$hooks[$hook], '\\SciActive\\Hook::sortCallbacks');
    return array_keys(Hook::$hooks[$hook], $callback);
  }