commandSave = $commandSave; $this->commandGet = $commandGet; $this->commandDeleteById = $commandDeleteById; $this->commandGetList = $commandGetList; } /** * @inheritdoc */ public function save(StockInterface $stock): int { return $this->commandSave->execute($stock); } /** * @inheritdoc */ public function get(int $stockId): StockInterface { return $this->commandGet->execute($stockId); } /** * @inheritdoc */ public function deleteById(int $stockId): void { $this->commandDeleteById->execute($stockId); } /** * @inheritdoc */ public function getList(SearchCriteriaInterface $searchCriteria = null): StockSearchResultsInterface { return $this->commandGetList->execute($searchCriteria); } }