View api handles composer method with anonymous function.
View composers can be class based.