/** * @return string[] * @param bool $sendBase */ public function ToArray($sendBase = true) { $result = array('id' => (int) $this->ID, 'title' => $this->Title, 'description' => $this->Description, 'created' => $this->CreateStamp, 'modified' => $this->ModifyStamp); if ($sendBase && $this->BaseIngredient) { $result += array('base' => $this->BaseIngredient->ToArray(false)); } return $result; }