for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of Phraseanet SDK.
*
* (c) Alchemy <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PhraseanetSDK\Entity;
use PhraseanetSDK\Annotation\ApiField as ApiField;
use PhraseanetSDK\Annotation\Id as Id;
class RecordCaption
{
public static function fromList(array $values)
$captions = array();
foreach ($values as $value) {
$captions[$value->meta_structure_id] = self::fromValue($value);
}
return $captions;
public static function fromValue(\stdClass $value)
return new self($value);
/**
* @var \stdClass
protected $source;
* @param \stdClass $source
public function __construct(\stdClass $source)
$this->source = $source;
* @return \stdClass
public function getRawData()
return $this->source;
* @deprecated Use getRawData() instead
public function getSource()
* Get the related databox meta field id
* @return integer
public function getMetaStructureId()
return $this->source->meta_structure_id;
* Get the name of the caption
* @return string
public function getName()
return $this->source->name;
* Get the value of the caption
public function getValue()
return $this->source->value;