public function setPrivileges(array $privileges)
    {
        foreach ($privileges as $privilege) {
            $this->privileges[$privilege->getCacheEntryIdentifier()] = $privilege;
        }
    }
public function setPrivileges(array $privileges)
    {
        foreach ($privileges as $privilege) {
            $this->privileges[$privilege->getCacheEntryIdentifier()] = $privilege;
        }
    }
public function setPrivileges ( array $ privileges ) { foreach ( $ privileges as $ privilege ) { $ this -> privileges [ $ privilege -> getCacheEntryIdentifier ( ) ] = $ privilege ; } }
Assign privileges to this role.

@param PrivilegeInterface[] $privileges
@return void
Assign privileges to this role .