PHP dependency visualization in Netbeans

136 views Asked by At

I am trying to implement the relevant parts of a payment system (by Paymill) into my plain PHP website. The problem is that the example project I am trying to learn from is not only coded in PHP OOP and MVC (I'm new to both concepts), but most probably in a framework, maybe in Symfony with so many dependencies that I find it hard to retrace the flow and single out the relevant parts (the payment process) for my own project. The login procedure alone jumps around between model-, view- and controller-files and -classes in a way that, if visualized, it would easily fill a DIN A4-sheet!

I would thus like to visualize the complete flow to gain a better overview and understanding of the project.

My questions are:

  1. is this a good approach?
  2. if yes: is there a way to have Netbeans visualize the flow automatically rather than me spending hours running through line by line in XDebug and draw the flow between the files / classes myself?

Many thanks in advance!

1

There are 1 answers

2
stoilkov On

The example project you are referring to is quite complex because it deals with subscriptions. Also the example is for the v2 API of PAYMILL. In the meantime a v2.1 was released, which significantly improves subscription handling. If you want a simple example in plain PHP you should better start with the example projects: https://github.com/paymill/paymill-payment-form https://github.com/paymill/paymill-paybutton-examples

They contain a HTML part(s) and a corresponding plain PHP that handles the payment on the server side (e.g. payment.php) . These projects should make your introduction to PAYMILL much easier. If you want to build a more complex logic afterwards, for example a complex subscription handling, you can move on the the subscription example.