protected static function serializeHandlers()
    {
        $hooks = (array) self::getTask()->handlers;
        foreach ($hooks as &$handlers) {
            foreach (array_keys($handlers) as $key) {
                self::toggleSerializeClosure($handlers, $key);
            }
        }

        return $hooks;
    }
protected static function serializeHandlers()
    {
        $hooks = (array) self::getTask()->handlers;
        foreach ($hooks as &$handlers) {
            foreach (array_keys($handlers) as $key) {
                self::toggleSerializeClosure($handlers, $key);
            }
        }

        return $hooks;
    }
protected static function serializeHandlers ( ) { $ hooks = ( array ) self :: getTask ( ) -> handlers ; foreach ( $ hooks as & $ handlers ) { foreach ( array_keys ( $ handlers ) as $ key ) { self :: toggleSerializeClosure ( $ handlers , $ key ) ; } } return $ hooks ; }
Serialize the hooks' handlers.

@return array
Serialize the hooks handlers .