public function store_notifications( $queue_id, array $notifications, Strategy $strategy = null ) {

		$all = get_option( $this->bucket, array() );

		$found = empty( $all ) ? false : true;

		if ( empty( $notifications ) ) {
			return $this->clear_notifications( $queue_id );
		}

		$all[ $queue_id ] = array(
			'notifications' => $notifications
		);

		if ( isset( $strategy ) ) {
			$all[ $queue_id ]['strategy'] = $strategy;
		}

		if ( $found ) {
			return update_option( $this->bucket, $all );
		} else {
			return add_option( $this->bucket, $all, '', 'no' );
		}
	}
public function store_notifications( $queue_id, array $notifications, Strategy $strategy = null ) {

		$all = get_option( $this->bucket, array() );

		$found = empty( $all ) ? false : true;

		if ( empty( $notifications ) ) {
			return $this->clear_notifications( $queue_id );
		}

		$all[ $queue_id ] = array(
			'notifications' => $notifications
		);

		if ( isset( $strategy ) ) {
			$all[ $queue_id ]['strategy'] = $strategy;
		}

		if ( $found ) {
			return update_option( $this->bucket, $all );
		} else {
			return add_option( $this->bucket, $all, '', 'no' );
		}
	}
public function store_notifications ( $ queue_id , array $ notifications , Strategy $ strategy = null ) { $ all = get_option ( $ this -> bucket , array ( ) ) ; $ found = empty ( $ all ) ? false : true ; if ( empty ( $ notifications ) ) { return $ this -> clear_notifications ( $ queue_id ) ; } $ all [ $ queue_id ] = array ( 'notifications' => $ notifications ) ; if ( isset ( $ strategy ) ) { $ all [ $ queue_id ] [ 'strategy' ] = $ strategy ; } if ( $ found ) { return update_option ( $ this -> bucket , $ all ) ; } else { return add_option ( $ this -> bucket , $ all , '' , 'no' ) ; } }
Store a set of notifications.

If notifications is empty, it will clear the set.

@since 1.0

@param string         $queue_id
@param Notification[] $notifications
@param Strategy       $strategy If null, previously set strategy will be used.

@return bool
Store a set of notifications .