How are weights organized in Conv2D layers? I trained a model using Keras from this example. The model summary showed me this result 

    Model: "sequential_1"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
conv2d_1 (Conv2D)            (None, 26, 26, 32)        320       
_________________________________________________________________
conv2d_2 (Conv2D)            (None, 24, 24, 64)        18496     
_________________________________________________________________
max_pooling2d_1 (MaxPooling2 (None, 12, 12, 64)        0         
_________________________________________________________________
dropout_1 (Dropout)          (None, 12, 12, 64)        0         
_________________________________________________________________
flatten_1 (Flatten)          (None, 9216)              0         
_________________________________________________________________
dense_1 (Dense)              (None, 128)               1179776   
_________________________________________________________________
dropout_2 (Dropout)          (None, 128)               0         
_________________________________________________________________
dense_2 (Dense)              (None, 10)                1290      
=================================================================
Total params: 1,199,882
Trainable params: 1,199,882
Non-trainable params: 0


There are 8 layers and model.get_weights() also shows the first dimension of 8. As I understood correctly things like Pooling and Flatten are "operators" over the input matrices, so why it is presented as a layer? How to understand what is stored in weight array for example in Pooling layer (model.get_weights()[2])?
If you print those shapes using below for loop

weights_m=model.get_weights()
for i in range(8):
  print(weights_m[i].shape)


you will get output as 

(3, 3, 1, 32)
(32,)
(3, 3, 32, 64)
(64,)
(9216, 128)
(128,)
(128, 10)
(10,)  

so we will get one layer weight and bias. we have a total of 4 layers(2 conv + 2 dense) so 8 weight vectors.