I found old VM 1 code with great way of explaining what is its purpose and what is happening. http://forum.virtuemart.net/index.php?topic=37397.0
Please consider sometimes explain noobies interested in coding what the code is aimed for. It helps others and grows the VM community.
It is simply not possible to explain such basic concepts for an extension like this
the example u give is pure php .. you could google any one of those functions and find what they do
The code base is beautifully standard MVC with a few helpers thrown in .. once you understand how one Controller/Model/View works in VM you understand them all
The code is very clean, well formatted and is to some extent commented
You would do better to learn the basics of php and it functions
The next problem that we use maybe 3 lines per step. We try to follow the rule, call important variables what they are, even it gets maybe a bit long. On the other hand, try to use for unimportant vars only shortcuts.
Actually the code is quite simpel.
The index.php in the root calls the joomla application, which calls due the "option=com_virtuemart" the index.php in the regarding folder. This is either components/com_virtuemart, or the almost the same just with a trailing administrator, /administrator/components/com_virtuemart.
The index.php there calls first the VmConfig and loads the vm environment. Then we call a controller in index.php/controllers. This controller has usually the same name as the view. A controller calls a task, which defaults to "function display". This calls the view and excecutes a view.html.php in the folder index.php/views/myview. And the file view.html.php calls the layouts.
That is a short description of a call in virtuemart.
But this gives you just a hook to understand where you could start to understand the process. But more important is to learn the vmdebug and vmTrace. We always search for writers http://docs.virtuemart.net/tutorials.html