2 namespace Utility\Entity;
4 use Doctrine\ORM\Mapping as ORM;
11 * @ORM\Table(name="lib_photo")
17 * Can archive records.
21 * Pull Synchronization Strategy for this table.
23 const PULL_SYNCH_STRATEGY = false;
25 * Push Synchronization Strategy for this table.
27 const PUSH_SYNCH_STRATEGY = false;
31 * @ORM\Column(type="integer");
32 * @ORM\GeneratedValue(strategy="AUTO")
37 * @ORM\Column(type="string", length=250)
42 * @ORM\Column(type="string", length=200, name="mime_type")
47 * @ORM\Column(type="boolean");
49 protected $archived = false;
53 * Magic getter to expose protected properties.
54 * @param string $property
57 public function __get($property)
59 return $this->$property;
63 * Magic setter to save protected properties.
64 * @param string $property
67 public function __set($property, $value)
69 $this->$property = $value;
73 * Convert the object to an array.
74 * @param array $expand
77 public function toArray(array $expand = array())
81 'filename' => $this->filename,
82 'mimeType' => $this->mimeType
87 * Populate from an array.
90 public function fromArray($data = array())
93 && $this->id = $data['id'];
94 isset($data['filename'])
95 && $this->filename = $data['filename'];
96 isset($data['mimeType'])
97 && $this->mimeType = $data['mimeType'];