Skip to content

Instantly share code, notes, and snippets.

@damiankloip
Created April 30, 2014 17:12
Show Gist options
  • Save damiankloip/11432892 to your computer and use it in GitHub Desktop.
Save damiankloip/11432892 to your computer and use it in GitHub Desktop.
// Add missing arguments not defined in the path, but added as handler.
while (($total_arguments - $arg_counter) > 0) {
$arg_id = 'arg_' . $arg_counter++;
$bit = '{' . $arg_id . '}';
// In contrast to the previous loop add the defaults here, as % was not
// specified, which means the argument is optional.
$defaults[$arg_id] = NULL;
$bits[] = $bit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment