I have made a tiny ModX snippet that looks like this
<?php
$theMenu = $modx->runSnippet('Wayfinder',
array("startId" => 0, "level"=>1)
);
echo $theMenu;
?>
but I would like it to pass ALL params it receives to Wayfinder. I will only be modifying the "level" parameter from my snippet.
Is there any way, without naming all the relevant variables individually, to cycle through all the currently SET variables in PHP?
Edit: I don't think that get_defined_vars is the right way to go, as it gets too much stuff. This trivial PHP page prints out the number 14, for instance:
<?php
echo count(get_defined_vars());
?>