Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 405 Bytes

NotPolicy.md

File metadata and controls

20 lines (14 loc) · 405 Bytes

NotPolicy

<?php

use Chubbyphp\Deserialization\Denormalizer\DenormalizerContextInterface;
use Chubbyphp\Deserialization\Policy\NotPolicy;
use MyProject\Model\Model;
use MyProject\Policy\SomePolicy;

$model = new Model();

/** @var DenormalizerContextInterface $context */
$context = ...;

$policy = new NotPolicy(new SomePolicy());

echo $policy->isCompliant('path', $model, $context);
// 1