public function diff($rights)
    {
        $rlist = array_diff(str_split($rights), array_keys($this->_virtual));

        return array(
            'added' => implode('', array_diff($rlist, $this->_rights)),
            'removed' => implode('', array_diff($this->_rights, $rlist))
        );
    }
public function diff($rights)
    {
        $rlist = array_diff(str_split($rights), array_keys($this->_virtual));

        return array(
            'added' => implode('', array_diff($rlist, $this->_rights)),
            'removed' => implode('', array_diff($this->_rights, $rlist))
        );
    }
public function diff ( $ rights ) { $ rlist = array_diff ( str_split ( $ rights ) , array_keys ( $ this -> _virtual ) ) ; return array ( 'added' => implode ( '' , array_diff ( $ rlist , $ this -> _rights ) ) , 'removed' => implode ( '' , array_diff ( $ this -> _rights , $ rlist ) ) ) ; }
Computes the difference to another rights string.
Virtual rights are ignored.

@param string $rights  The rights to compute against.

@return array  Two element array: added and removed.
Computes the difference to another rights string . Virtual rights are ignored .