I have this Markdown text:

And after converting it to HTML with Markdown' Parsedown PHP parser (http://parsedown.org/) I get:
<p><img alt="alt" src="/md.png" title="title" /></p>
I need to add certain values before and after the conversion as well as inside the code such that the desired result would be like
<a href='#' class='some_class'>
<p><img class='some_classy_image' alt="alt" src="/md.png" title="title" /></p>
</a>
How can I achieve this in a easy way? I'm open to an answer using Parsedown or another PHP parser out there that exposes this functions in a easier way.