[clean] remove shared_kind Array
fix _shared.yml detection
Add contentType helper

detect the text content format JSON | YML | TXT | false
[clean] externalize detection of type

remove possible memoryleak (switch create_function for anonymous
function)