1 | <?php |
||
22 | class Export extends Decorator |
||
23 | { |
||
24 | /** |
||
25 | * File handle |
||
26 | * |
||
27 | * @var resource |
||
28 | */ |
||
29 | protected $handle; |
||
30 | |||
31 | /** |
||
32 | * Append to end file |
||
33 | * |
||
34 | * @var bool |
||
35 | */ |
||
36 | protected $append = true; |
||
37 | |||
38 | /** |
||
39 | * @param OutputInterface $output |
||
40 | * @param string $filename |
||
41 | * @param bool $append |
||
42 | */ |
||
43 | 76 | public function __construct(OutputInterface $output, $filename, $append = true) |
|
59 | |||
60 | /** |
||
61 | * @param array|string $messages |
||
62 | * @param bool|false $newline |
||
63 | * @param int $type |
||
64 | */ |
||
65 | 49 | public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL) |
|
70 | |||
71 | /** |
||
72 | * @param array|string $messages |
||
73 | * @param int $type |
||
74 | */ |
||
75 | 24 | public function writeln($messages, $type = self::OUTPUT_NORMAL) |
|
80 | |||
81 | /** |
||
82 | * @param string|array $messages |
||
83 | * @param bool $newline |
||
84 | */ |
||
85 | 73 | protected function writeToFile($messages, $newline) |
|
100 | |||
101 | 73 | public function unlock() { |
|
107 | |||
108 | 73 | public function __destruct() |
|
112 | } |
||
113 |