puphpet/puphpet — pull request #377 by frastel (2014-01-06 17:21:30+00:00)
Title: added possibility to customize extension data by global config with hostname as showcase

So far it is not possible to make something like suggested in #364. Here some config from one extension (apache or nginx extension) would be needed in some other extension (vagrant local). Sounds easy, but currently one extension has only access to its own configuration and [could not be modified by global configuration](https://github.com/puphpet/puphpet/blob/master/src/Puphpet/MainBundle/Extension/Manager.php#L236).

I added an event which could be used for manipulating the extension data before it is bound to the extension itself. The workflow is somehow equal like it was done in v1.

I tried to add less overhead as possible. I know that you @jtreminio prefer working code before more elegant code which may introduce dozens of additional locs.

As showcase PuPHPet would take now the hostname from the first available vhost from the apache or nginx configuration. With this addition I fixed the hostname configuration already existing in [the manifest template](https://github.com/puphpet/puphpet/blob/master/src/Puphpet/Extension/VagrantfileLocalBundle/Resources/views/manifest/VagrantfileLocal.pp.twig#L4). It was not really used currently.

Refers to #252 and would fix #364