symfony-cmf/MediaBundle — pull request #2 by dbu (2013-04-08 11:44:54+00:00)
Title: adding media interfaces and a download controller draft

i slightly diverge from https://github.com/symfony-cmf/symfony-cmf/wiki/Media - sometimes to use the same names as https://github.com/sonata-project/SonataMediaBundle/blob/master/Model/MediaInterface.php and sometimes to make things simpler. lets discuss the details.

this should then replace the insecure code we have at https://github.com/liip/LiipImagineBundle/blob/master/Imagine/Data/Loader/DoctrinePHPCRLoader.php#L41 and we should move the model objects here from CreateBundle https://github.com/symfony-cmf/CreateBundle/blob/master/Document/Image.php and replace the interface https://github.com/symfony-cmf/CreateBundle/blob/master/Model/ImageInterface.php as well as the phpcr-odm image model class - having an image in phpcr-odm was the wrong place.

images should be output using imagine, but for downloads i think this controller makes sense. rather than allowing any download, we can have routes for downloadable documents, cleaner and at the same time simpler.