Deprecated get_uuid in favor of getUuid

This commit is contained in:
Benoît Burnichon
2015-07-13 18:08:04 +02:00
parent 38ae7bc2ac
commit 2107cd28df
5 changed files with 14 additions and 14 deletions

View File

@@ -1147,7 +1147,7 @@ class V1Controller extends Controller
'thumbnail' => $this->listEmbeddableMedia($request, $record, $record->get_thumbnail()),
'technical_informations' => $technicalInformation,
'phrasea_type' => $record->get_type(),
'uuid' => $record->get_uuid(),
'uuid' => $record->getUuid(),
];
if ($request->attributes->get('_extended', false)) {
@@ -1219,7 +1219,7 @@ class V1Controller extends Controller
'created_on' => $story->getCreated()->format(DATE_ATOM),
'collection_id' => \phrasea::collFromBas($this->app, $story->get_base_id()),
'thumbnail' => $this->listEmbeddableMedia($request, $story, $story->get_thumbnail()),
'uuid' => $story->get_uuid(),
'uuid' => $story->getUuid(),
'metadatas' => [
'@entity@' => self::OBJECT_TYPE_STORY_METADATA_BAG,
'dc:contributor' => $format($caption, \databox_Field_DCESAbstract::Contributor),

View File

@@ -70,7 +70,7 @@ class ESRecordSerializer extends AbstractSerializer
'technical_informations' => $technicalInformation,
'phrasea_type' => $record->get_type(),
'type' => $record->is_grouping() ? 'story' : 'record',
'uuid' => $record->get_uuid(),
'uuid' => $record->getUuid(),
'caption' => $caption,
'status' => $status,
'caption-business' => $business,

View File

@@ -108,23 +108,23 @@ class WriteMetadataJob extends AbstractJob
$metadata = new Metadata\MetadataBag();
if ($record->get_uuid()) {
if ($record->getUuid()) {
$metadata->add(
new Metadata\Metadata(
new Tag\XMPExif\ImageUniqueID(),
new Value\Mono($record->get_uuid())
new Value\Mono($record->getUuid())
)
);
$metadata->add(
new Metadata\Metadata(
new Tag\ExifIFD\ImageUniqueID(),
new Value\Mono($record->get_uuid())
new Value\Mono($record->getUuid())
)
);
$metadata->add(
new Metadata\Metadata(
new Tag\IPTC\UniqueDocumentID(),
new Value\Mono($record->get_uuid())
new Value\Mono($record->getUuid())
)
);
}

View File

@@ -127,8 +127,14 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
/**
* @return string
* @deprecated use {@link getUuid} instead.
*/
public function get_uuid()
{
return $this->getUuid();
}
public function getUuid()
{
return $this->uuid;
}
@@ -1828,12 +1834,6 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
return $this->get_type();
}
/** {@inheritdoc} */
public function getUuid()
{
return $this->get_uuid();
}
/** {@inheritdoc} */
public function getId()
{

View File

@@ -107,7 +107,7 @@ class record_adapterTest extends \PhraseanetAuthenticatedTestCase
public function testGet_uuid()
{
$this->assertTrue(Uuid::isValid($this->getRecord1()->get_uuid()));
$this->assertTrue(Uuid::isValid($this->getRecord1()->getUuid()));
}
public function testGetUpdated()