2 namespace Stock\Entity;
4 use Doctrine\ORM\Mapping as ORM;
10 * @ORM\Table(name="vehicle_natis", uniqueConstraints={@ORM\UniqueConstraint(name="unique_natis", columns={"name"})})
16 * Can archive records.
20 * Pull Synchronization Strategy for this table.
22 const PULL_SYNCH_STRATEGY = 'Build';
24 * Push Synchronization Strategy for this table.
26 const PUSH_SYNCH_STRATEGY = 'Build';
31 * @ORM\Column(type="integer");
32 * @ORM\GeneratedValue(strategy="AUTO")
37 * @ORM\Column(type="string", length=75, unique=true)
42 * @ORM\Column(type="boolean");
44 protected $archived = false;
49 * Magic getter to expose protected properties.
50 * @param string $property
53 public function __get($property)
55 return $this->$property;
59 * Magic setter to save protected properties.
60 * @param string $property
63 public function __set($property, $value)
65 $this->$property = $value;
69 * Convert the object to an array.
70 * @param array $expand
71 * @param array $intersect
74 public function toArray(array $expand = array(), array $intersect = array())
76 $includeAll = empty($intersect);
78 ($includeAll || isset($intersect['id']))
79 && $data['id'] = $this->id;
80 ($includeAll || isset($intersect['name']))
81 && $data['name'] = $this->name;
86 * Convert the object to an array for synchronization.
89 public function toSynchArray()
98 * Populate from an array.
101 public function fromArray($data = array())
104 && $this->id = $data['id'];
106 && $this->name = $data['name'];