2 namespace Valuation\Entity;
4 use Doctrine\ORM\Mapping as ORM;
10 * @ORM\Table(name="stock_valuation_valuators")
12 class ValuationValuators
16 * Can archive records.
18 const ARCHIVE = false;
20 * Pull Synchronization Strategy for this table.
22 const PULL_SYNCH_STRATEGY = false;
24 * Push Synchronization Strategy for this table.
26 const PUSH_SYNCH_STRATEGY = false;
31 * @ORM\Column(type="integer");
32 * @ORM\GeneratedValue(strategy="AUTO")
37 * @ORM\ManyToOne(targetEntity="Valuation", inversedBy="damages")
38 * @ORM\JoinColumn(name="stock_valuation_id", referencedColumnName="id")
43 * @ORM\ManyToOne(targetEntity="\User\Entity\Profile")
44 * @ORM\JoinColumn(name="profile_id", referencedColumnName="id")
51 * Magic getter to expose protected properties.
52 * @param string $property
55 public function __get($property)
57 return $this->$property;
61 * Magic setter to save protected properties.
62 * @param string $property
65 public function __set($property, $value)
67 $this->$property = $value;
71 * Convert the object to an array.
72 * @param array $expand
73 * @param array $intersect
76 public function toArray(array $expand = array(), array $intersect = array())
78 $includeAll = empty($intersect);
80 ($includeAll || isset($intersect['id']))
81 && $data['id'] = $this->id;
82 ($includeAll || isset($intersect['valuation']))
83 && $data['valuation'] = $this->valuation->toArray($expand, $intersect);
84 ($includeAll || isset($intersect['profile']))
85 && $data['profile'] = $this->profile->toArray($expand, $intersect);
90 * Populate from an array.
93 public function fromArray($data = array())
96 && $this->id = $data['id'];
97 isset($data['valuation'])
98 && $this->valuation = $data['valuation'];
99 isset($data['profile'])
100 && $this->profile = $data['profile'];