クラス
ComboGroup
ソース ソース
ファイル: src/Types/ComboGroup.php
class ComboGroup implements JsonSerializable { /** * Group ID * * @var int */ private $id; /** * Combo-set ID * * @var int */ private $comboSetId; /** * Group label * * @var string */ private $label; /** * Optional flag * * @var bool */ private $optional; /** * Multi-select flag * * @var bool */ private $enableMultiSelect; /** * Position in the group list * * Lower means higher priority * * @var int */ private $position; /** * Items in the group * * @var GroupItem[] */ private $items; /** * Created at UTC `DATETIME` string * * @var string */ private $createdAt; /** * Updated at UTC `DATETIME` string * * @var string */ private $updatedAt; /** * Constructs a combo group * * @author Evan D Shaw <evandanielshaw@gmail.com> * @param int $id * @param int $comboSetId * @param string $label * @param bool $optional * @param bool $enableMultiSelect * @param int $position * @param GroupItem[] $items * @param string $createdAt * @param string $updatedAt * @return void */ public function __construct($id, $comboSetId, $label, $optional, $enableMultiSelect, $position, $items, $createdAt, $updatedAt) { $this->id = (int)$id; $this->comboSetId = (int)$comboSetId; $this->label = (string)$label; $this->optional = (bool)$optional; $this->enableMultiSelect = (bool)$enableMultiSelect; $this->position = (int)$position; $this->items = is_array($items) ? $items : []; $this->createdAt = $createdAt; $this->updatedAt = $updatedAt; } /** * Returns key-value representation of the object * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return array */ public function jsonSerialize() { return [ 'id' => $this->id, 'comboSetId' => $this->comboSetId, 'label' => $this->label, 'optional' => $this->optional, 'enableMultiSelect' => $this->enableMultiSelect, 'position' => $this->position, 'items' => $this->items, 'createdAt' => $this->createdAt, 'updatedAt' => $this->updatedAt, ]; } /** * Getter for `$this->id` * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return int */ public function getId() { return $this->id; } /** * Getter for `$this->comboSetId` * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return int */ public function getComboSetId() { return $this->comboSetId; } /** * Getter for `$this->label` * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return string */ public function getLabel() { return $this->label; } /** * Getter for `$this->optional` * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return bool */ public function getOptional() { return $this->optional; } /** * Getter for `$this->enableMultiSelect` * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return bool */ public function getEnableMultiSelect() { return $this->enableMultiSelect; } /** * Getter for `$this->position` * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return int */ public function getPosition() { return $this->position; } /** * Getter for `$this->items` * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return GroupItem[] */ public function getItems() { return $this->items; } /** * Getter for `$this->createdAt` * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return string */ public function getCreatedAt() { return $this->createdAt; } /** * Getter for `$this->updatedAt` * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return string */ public function getUpdatedAt() { return $this->updatedAt; } }
- __construct — Constructs a combo group
- getComboSetId — Getter for `$this->comboSetId`
- getCreatedAt — Getter for `$this->createdAt`
- getEnableMultiSelect — Getter for `$this->enableMultiSelect`
- getId — Getter for `$this->id`
- getItems — Getter for `$this->items`
- getLabel — Getter for `$this->label`
- getOptional — Getter for `$this->optional`
- getPosition — Getter for `$this->position`
- getUpdatedAt — Getter for `$this->updatedAt`
- jsonSerialize — Returns key-value representation of the object