/**
* Merges an array of identities for an action.
*
* @param string $action The name of the action.
* @param array $identities An array of identities
*
* @return void
*
* @since 1.7.0
*/
public function mergeAction($action, $identities)
{
if (isset($this->data[$action])) {
// If exists, merge the action.
$this->data[$action]->mergeIdentities($identities);
} else {
// If new, add the action.
$this->data[$action] = new Rule($identities);
}
}