This is just a convention implemented to client options supporting
callable initializers such as "profile", "cluster" and "replication".
This is useful to get a fully-initialized default value and perform
additional operations before returning it. An example with "profile":
$options = array(
'commands' => array(
'test1' => 'Predis\Command\ConnectionEcho',
'test2' => 'Predis\Command\ConnectionEcho',
),
'profile' => function ($options, $option) {
$profile = $option->getDefault($options);
if (is_array($options->commands)) {
foreach ($options->commands as $id => $cmd) {
$profile->defineCommand($id, $cmd);
}
}
return $profile;
},
);