1 <?php
 2 
 3 namespace Docoflow\Traits;
 4 
 5  6  7  8  9 
10 trait BulkValidator
11 {
12     13 14 15 16 
17     public function approve()
18     {
19         foreach ($this as $validable) {
20             $validable->approve();
21         }
22 
23         return $this;
24     }
25 
26     27 28 29 30 
31     public function approveIf()
32     {
33         foreach ($this as $validable) {
34             $validable->approveIf();
35         }
36 
37         return $this;
38     }
39 
40     41 42 43 44 
45     public function reject()
46     {
47         foreach ($this as $validable) {
48             $validable->reject();
49         }
50 
51         return $this;
52     }
53 
54     55 56 57 58 
59     public function rejectIf()
60     {
61         foreach ($this as $validable) {
62             $validable->rejectIf();
63         }
64 
65         return $this;
66     }
67 
68     69 70 71 72 
73     public function reset()
74     {
75         foreach ($this as $validable) {
76             $validable->reset();
77         }
78 
79         return $this;
80     }
81 
82     83 84 85 86 
87     public function resetIf()
88     {
89         foreach ($this as $validable) {
90             $validable->resetIf();
91         }
92 
93         return $this;
94     }
95 }
96