You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CreditHistoryFactory.php 860B

3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Credit;
  3. use App\Entity\Credit\CreditHistory;
  4. use Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface;
  5. use Lc\CaracoleBundle\Model\User\UserMerchantInterface;
  6. use Lc\SovBundle\Factory\AbstractFactory;
  7. use Lc\SovBundle\Model\User\UserInterface;
  8. class CreditHistoryFactory extends AbstractFactory
  9. {
  10. // createCreditHistory
  11. public function create(string $type,UserMerchantInterface $userMerchant ): CreditHistoryInterface
  12. {
  13. $creditHistory = $this->createBase($userMerchant);
  14. $creditHistory->setType($type) ;
  15. return $creditHistory;
  16. }
  17. public function createBase(UserMerchantInterface $userMerchant): CreditHistoryInterface
  18. {
  19. $creditHistory = new CreditHistory();
  20. $creditHistory->setUserMerchant($userMerchant) ;
  21. return $creditHistory;
  22. }
  23. }