mako-framework/framework — pull request #86 by aldoanizio (2014-03-10 03:44:06+00:00)
Title: Use default value if segment is set but is empty

This is usefull if a key segment is defined but is empty. So Array helper will return default value;

// Returns default "id" if no order_by parameter is defined in "GET" url parameters
Arr::get($my_get_url_parameters, 'order_by', 'id', true);

// Returns default "desc" if no order_by parameter is defined in "GET" url parameters
Arr::get($my_get_url_parameters, 'order', 'desc', true);