From ea0f089f516c442b266adadc22a2ad75b34d6365 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guillaume=20Perr=C3=A9al?= <guillaume.perreal@irstea.fr>
Date: Thu, 22 Jan 2015 10:12:39 +0100
Subject: [PATCH] =?UTF-8?q?UploadedFile:=20ajout=20de=20m=C3=A9thodes=20"g?=
 =?UTF-8?q?etContent"=20et=20"getLastModified".?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 Entity/UploadedFile.php | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/Entity/UploadedFile.php b/Entity/UploadedFile.php
index 55038e65..d853fdfc 100644
--- a/Entity/UploadedFile.php
+++ b/Entity/UploadedFile.php
@@ -252,7 +252,7 @@ class UploadedFile
     /**
      * Get createdAt
      *
-     * @return \datettime
+     * @return \DateTime
      */
     public function getCreatedAt()
     {
@@ -359,4 +359,21 @@ class UploadedFile
         $stream->open(new StreamMode($mode));
         return $stream;
     }
+
+    /**
+     *
+     * @return string
+     */
+    public function getContent()
+    {
+        return $this->filesystem->read($this->getPath());
+    }
+
+    /**
+     * @return \DateTime
+     */
+    public function getLastModified()
+    {
+        return new \DateTime(sprintf('@%d', $this->filesystem->mtime($this->getPath())));
+    }
 }
-- 
GitLab