A thorny shrub in Karoo NP

A thorny shrub in Karoo NP

Observation - A thorny shrub in Karoo NP - Southern Africa. Description: I am curious about the leaves springing out of thorns, in the third picture. Actually, I have seen pictures of Lycium ferocissimum with flowers or fruits on thorns. How can this be explained? Does it means that these thorns are transformed branches, i

I am curious about the leaves springing out of thorns, in the third picture.
Actually, I have seen pictures of Lycium ferocissimum with flowers or fruits on thorns.
How can this be explained?
Does it means that these thorns are transformed branches, instead of transformed leaves?
Thank you for any information MG