Browse files

ImageDocument was moved to ODM

  • Loading branch information...
1 parent 0d75618 commit c19886df05a3d09c00502bc59499aa4633fd4423 @elHornair elHornair committed Feb 22, 2013
Showing with 1 addition and 76 deletions.
  1. +0 −75 Document/Image.php
  2. +1 −1 Form/DataTransformer/ModelToFileTransformer.php
View
75 Document/Image.php
@@ -1,75 +0,0 @@
-<?php
-
-namespace Doctrine\Bundle\PHPCRBundle\Document;
-
-use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM;
-use Doctrine\ODM\PHPCR\Document\File;
-
-/**
- * @PHPCRODM\Document(referenceable=true)
- */
-class Image
-{
-
- /**
- * @PHPCRODM\Id
- */
- protected $path;
-
- /**
- * Image file child
- *
- * @PHPCRODM\Child(name="file", cascade="persist")
- */
- protected $file;
-
-
- /**
- * @param $file File
- */
- public function setFile(File $file)
- {
- $this->file = $file;
- }
-
- /**
- * @return File
- */
- public function getFile()
- {
- return $this->file;
- }
-
- /**
- * @param $mimeType string
- */
- public function setMimeType($mimeType)
- {
- $this->file->getContent()->setMimeType($mimeType);
- }
-
- /**
- * @return string
- */
- public function getMimeType()
- {
- return $this->file->getContent()->getMimeType();
- }
-
- /**
- * @return stream
- */
- public function getContent()
- {
- return $this->file->getFileContentAsStream();
- }
-
- /**
- * @return string
- */
- public function __toString()
- {
- return $this->path;
- }
-
-}
View
2 Form/DataTransformer/ModelToFileTransformer.php
@@ -6,7 +6,7 @@
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Doctrine\ODM\PHPCR\Document\File as PHPCRFile;
use Doctrine\Common\Util\Debug;
-use Doctrine\Bundle\PHPCRBundle\Document\Image;
+use Doctrine\ODM\PHPCR\Document\Image;
class ModelToFileTransformer implements DataTransformerInterface
{

0 comments on commit c19886d

Please sign in to comment.