Skip to content

Instantly share code, notes, and snippets.

@Vilintritenmert
Vilintritenmert / CustomerRegister.php
Created December 10, 2020 08:55
Domain Driven Design
<?php
class Register {
/**
* @param $repository CustomerRepositoryInterface
* @param $history CustomerHistoryInterface
**/
public function __constructor(
CustomerRepositoryInterface $repository,
const first = arrayOfData.filter(item=>item.match(/r1/g))
.map(item => {
result = item.match(/r1/g);
return {
name:result[0],
surename:result[1]
};
});
const second = arrayOfData.filter(item=>item.match(/r2/g))