Before doing anything else, install those:
- VirtualBox: https://www.virtualbox.org/wiki/Downloads
- Vagrant: https://www.vagrantup.com/downloads.html
- git: http://git-scm.com/download/win
Before doing anything else, install those:
| <?php | |
| // parseInlineVariables takes a multibyte string "stringToParse" and parses for $variable style | |
| // variables to swap with the value found in the "variables" associative array. It also supports | |
| // better matching with curly braces surrounding the variable, such as {$variable}. Spaces | |
| // within the curly braces are OK: { $variable } works too. | |
| // Adapt this function to your particular framework (put it in a class, keep it global, etc) | |
| function parseInlineVariables( $stringToParse, Array $variables ) | |
| { |
| <?php | |
| // saveJSON: XML to JSON conversion/transformation | |
| // The saveJSON method is implemented as a method of the example DOMDocumentExtended class, which | |
| // extends DOMDocument. It will transform the currently loaded DOM into JSON using XSLT. Since | |
| // there isn't a reliable automatic way of detecting if certain siblings nodes should be | |
| // represented as arrays or not, a "forceArray" parameter can be passed to the saveJSON method. | |
| // It should be noted that the forceArray functionality doesn't recognize namespaces. This is | |
| // an easy enough fix, I just didn't need it at the time of writing (look for local-name() and |