api/MarkLogic/MLPHP/Metadata.php
public function addPermissions($permissions)
    {
        if (is_array($permissions)) {
            foreach($permissions as $perm) {
                $this->permissions[$perm->getRoleName()] = $perm;
            }
        } else {
            $this->permissions[$permissions->getRoleName()] = $permissions;
        }
        return $this;
    }
public function addPermissions($permissions)
    {
        if (is_array($permissions)) {
            foreach($permissions as $perm) {
                $this->permissions[$perm->getRoleName()] = $perm;
            }
        } else {
            $this->permissions[$permissions->getRoleName()] = $permissions;
        }
        return $this;
    }
Add permissions metadata.

@param array|Permission $permissions An array of Permission objects or a Permission object.
@return Metadata $this