$property; } /** * Magic setter to save protected properties. * @param string $property * @param mixed $value */ public function __set($property, $value) { $this->$property = $value; } /** * Convert the object to an array. * @param array $expand * @param array $intersect * @return array */ public function toArray(array $expand = array(), array $intersect = array()) { $includeAll = empty($intersect); $data = array(); ($includeAll || isset($intersect['id'])) && $data['id'] = $this->id; ($includeAll || isset($intersect['priceGuideStock'])) && $data['priceGuideStock'] = $this->priceGuideStock->toArray($expand, $intersect); ($includeAll || isset($intersect['member'])) && $data['member'] = $this->member->toArray($expand, $intersect); return $data; } /** * Populate from an array. * @param array $data */ public function fromArray($data = array()) { isset($data['id']) && $this->id = $data['id']; isset($data['priceGuideStock']) && $this->priceGuideStock = $data['priceGuideStock']; isset($data['member']) && $this->member = $data['member']; } }