rocky48's post in How do you use 'Classes' in your code? was marked as the answer
I feel a right twit!
Such a basic mistake.
I didn't put the php tags around the class file.
The fact that the contents of the class file where printed out above the error should have made realise that it was not being parsed.