Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where is called src/Mfa/Application/Command/Handler/UpdateOrCreateApplianceCommandHandler.php ? #16

Open
Cepairda opened this issue Jun 14, 2021 · 1 comment

Comments

@Cepairda
Copy link

I took a close look at the code. And I did not find the place where this section of the code is called. Where does the call take place?

@josecelano
Copy link
Owner

Hi @Cepairda I'm using a command bus package: https://github.com/jildertmiedema/laravel-tactician

That means you can create a command and a command handler which is the service that handles the command.
That a simple package that follows some conventions in order to map the command with its handler.

These are the 2 points where the command is dispatched:

$this->dispatch(UpdateOrCreateApplianceCommand::fromData($data));

$this->dispatch(UpdateOrCreateApplianceCommand::fromData($data));

As you can see the method is injected in the class with a trait:

given by that package.

You have the documentation about Tactician here: https://tactician.thephpleague.com/

Be aware that this is an old project I have not had time to maintain. I was importing appliances data from a site that does not exist anymore: https://www.appliancesdelivered.ie/ I should change the crawler part to get data from another web.

I did another example using SYmphony: https://github.com/josecelano/ddd-symfony-sample but it's also very old although the principles still apply. But they have a lot of deprecated packages and I haven't tested them for a long time.

If you are looking for samples about how to apply DDD with PHP this is a good starting point: https://github.com/dddinphp
I got the basic ideas from their sample: https://github.com/dddinphp/last-wishes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants