public function assignRole($contentId, $roleId, array $limitation = null)
    {
        $limitation = $limitation ?: array('' => array(''));
        $this->userGateway->assignRole($contentId, $roleId, $limitation);
    }
public function assignRole($contentId, $roleId, array $limitation = null)
    {
        $limitation = $limitation ?: array('' => array(''));
        $this->userGateway->assignRole($contentId, $roleId, $limitation);
    }
public function assignRole ( $ contentId , $ roleId , array $ limitation = null ) { $ limitation = $ limitation ? : array ( '' => array ( '' ) ) ; $ this -> userGateway -> assignRole ( $ contentId , $ roleId , $ limitation ) ; }
Assigns role to a user or user group with given limitations.

The limitation array looks like:
<code>
array(
'Subtree' => array(
'/1/2/',
'/1/4/',
),
'Foo' => array( 'Bar' ),
…
)
</code>

Where the keys are the limitation identifiers, and the respective values
are an array of limitation values. The limitation parameter is optional.

@param mixed $contentId The groupId or userId to assign the role to.
@param mixed $roleId
@param array $limitation
Assigns role to a user or user group with given limitations .