public static function end($name, $key = null){

        if ($key) {
            $GLOBALS[ARX_HOOK][$name][$key] = ob_get_contents();
        } else {
            $GLOBALS[ARX_HOOK][$name] = ob_get_contents();
        }

        ob_end_clean();
    }