public function __construct($patchDocument, $allowedPatchOperations = null)
{
$defaultPatchOperations = Add::APPLY | Copy::APPLY | Move::APPLY | Remove::APPLY | Replace::APPLY | Test::APPLY;
$this->allowedPatchOperations = null !== $allowedPatchOperations ? $allowedPatchOperations : $defaultPatchOperations;
$this->patchOperations = $this->extractPatchOperations($patchDocument);
}