Add exif method to record interface

This commit is contained in:
Nicolas Le Goff
2014-12-02 16:35:50 +01:00
parent 6b7b012b6c
commit 552bb88d4e
2 changed files with 10 additions and 2 deletions

View File

@@ -57,4 +57,7 @@ interface RecordInterface
/** @return string */ /** @return string */
public function getStatus(); public function getStatus();
/** @return ArrayCollection */
public function getExif();
} }

View File

@@ -18,6 +18,7 @@ use Alchemy\Phrasea\Model\Serializer\CaptionSerializer;
use Alchemy\Phrasea\SearchEngine\SearchEngineInterface; use Alchemy\Phrasea\SearchEngine\SearchEngineInterface;
use Alchemy\Phrasea\SearchEngine\SearchEngineOptions; use Alchemy\Phrasea\SearchEngine\SearchEngineOptions;
use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManager;
use Doctrine\Common\Collections\ArrayCollection;
use MediaVorus\MediaVorus; use MediaVorus\MediaVorus;
use Rhumsaa\Uuid\Uuid; use Rhumsaa\Uuid\Uuid;
use Alchemy\Phrasea\Model\RecordInterface; use Alchemy\Phrasea\Model\RecordInterface;
@@ -740,7 +741,6 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
*/ */
public function get_technical_infos($data = false) public function get_technical_infos($data = false)
{ {
if (!$this->technical_datas) { if (!$this->technical_datas) {
try { try {
$this->technical_datas = $this->get_data_from_cache(self::CACHE_TECHNICAL_DATAS); $this->technical_datas = $this->get_data_from_cache(self::CACHE_TECHNICAL_DATAS);
@@ -1907,7 +1907,6 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
return $this->get_type(); return $this->get_type();
} }
/** {@inheritdoc} */ /** {@inheritdoc} */
public function getUpdated() public function getUpdated()
{ {
@@ -1936,4 +1935,10 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
{ {
return $this->get_status(); return $this->get_status();
} }
/** {@inheritdoc} */
public function getExif()
{
return new ArrayCollection($this->get_technical_infos());
}
} }