Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

phpdoc and type hinting

  • Loading branch information...
commit f7ffa8d1533e3650021ced6d210e34ce81ca37fe 1 parent 24c9645
@elHornair elHornair authored
Showing with 20 additions and 1 deletion.
  1. +20 −1 Document/Image.php
View
21 Document/Image.php
@@ -3,6 +3,7 @@
namespace Doctrine\Bundle\PHPCRBundle\Document;
use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM;
+use Doctrine\ODM\PHPCR\Document\File;
/**
* @PHPCRODM\Document(referenceable=true)
@@ -23,31 +24,49 @@ class Image
protected $file;
- public function setFile($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;
Please sign in to comment.
Something went wrong with that request. Please try again.