1 | <?php |
||
19 | class Export extends Decorator |
||
20 | { |
||
21 | /** |
||
22 | * File handle. |
||
23 | * |
||
24 | * @var resource |
||
25 | */ |
||
26 | protected $handle; |
||
27 | |||
28 | /** |
||
29 | * Append to end file. |
||
30 | * |
||
31 | * @var bool |
||
32 | */ |
||
33 | protected $append = true; |
||
34 | |||
35 | /** |
||
36 | * @param OutputInterface $output |
||
37 | * @param string $filename |
||
38 | * @param bool $append |
||
39 | */ |
||
40 | 76 | public function __construct(OutputInterface $output, $filename, $append = true) |
|
53 | 1 | ||
54 | /** |
||
55 | 73 | * @param array|string $messages |
|
56 | * @param bool|false $newline |
||
57 | * @param int $type |
||
58 | */ |
||
59 | public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL) |
||
64 | 49 | ||
65 | 49 | /** |
|
66 | 49 | * @param array|string $messages |
|
67 | * @param int $type |
||
68 | */ |
||
69 | public function writeln($messages, $type = self::OUTPUT_NORMAL) |
||
74 | 24 | ||
75 | 24 | /** |
|
76 | 24 | * @param string|array $messages |
|
77 | * @param bool $newline |
||
78 | */ |
||
79 | protected function writeToFile($messages, $newline) |
||
94 | |||
95 | 73 | public function unlock() |
|
101 | 73 | ||
102 | 73 | public function __destruct() |
|
106 | } |
||
107 |