public function addHook($hookwhere, $hook)
    {
        if (is_array($hook)) {
            if (isset($hook['classref']) && isset($hook['method']) && isset($hook['params'])) {
                if (is_object($hook['classref']) && method_exists($hook['classref'], $hook['method'])) {
                    $this->aCustomHooks[$hookwhere][] = $hook;
                    return true;
                }
            }
        }
        return false;
    }