We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a73bb41 + d6815e4 commit b13675bCopy full SHA for b13675b
Task/CallableTask.php
@@ -0,0 +1,33 @@
1
+<?php
2
+
3
+namespace As3\Bundle\PostProcessBundle\Task;
4
5
+/**
6
+ * Task for running a callable property.
7
+ *
8
+ * @author Jacob Bare <jacob.bare@gmail.com>
9
+ */
10
+class CallableTask implements TaskInterface
11
+{
12
+ /**
13
+ * @var callable
14
15
+ private $callable;
16
17
18
+ * @param callable $callable
19
20
+ public function __construct(callable $callable)
21
+ {
22
+ $this->callable = $callable;
23
+ }
24
25
26
+ * {@inheritdoc}
27
28
+ public function run()
29
30
+ $callable = $this->callable;
31
+ $callable();
32
33
+}
0 commit comments