Ejemplo n.º 1
0
 /**
  * Creates a new changes instance
  *
  * @param  (text.json.patch.Operation|[:var])[] $operations
  */
 public function __construct(...$operations)
 {
     foreach ($operations as $operation) {
         if ($operation instanceof Operation) {
             $this->operations[] = $operation;
         } else {
             $this->operations[] = Operations::named($operation['op'])->newInstance($operation);
         }
     }
 }