PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.2
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.2
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / app / Services / Spout / Writer / WriterInterface.php

WriterInterface.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.2.2, at app/Services/Spout/Writer/WriterInterface.php

92 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Box\Spout\Writer;
4
5 /**
6 * Interface WriterInterface
7 *
8 * @package Box\Spout\Writer
9 */
10 interface WriterInterface
11 {
12 /**
13 * Inits the writer and opens it to accept data.
14 * By using this method, the data will be written to a file.
15 *
16 * @param string $outputFilePath Path of the output file that will contain the data
17 * @return WriterInterface
18 * @throws \Box\Spout\Common\Exception\IOException If the writer cannot be opened or if the given path is not writable
19 */
20 public function openToFile($outputFilePath);
21
22 /**
23 * Inits the writer and opens it to accept data.
24 * By using this method, the data will be outputted directly to the browser.
25 *
26 * @param string $outputFileName Name of the output file that will contain the data. If a path is passed in, only the file name will be kept
27 * @return WriterInterface
28 * @throws \Box\Spout\Common\Exception\IOException If the writer cannot be opened
29 */
30 public function openToBrowser($outputFileName);
31
32 /**
33 * Write given data to the output. New data will be appended to end of stream.
34 *
35 * @param array $dataRow Array containing data to be streamed.
36 * Example $dataRow = ['data1', 1234, null, '', 'data5'];
37 * @return WriterInterface
38 * @throws \Box\Spout\Writer\Exception\WriterNotOpenedException If the writer has not been opened yet
39 * @throws \Box\Spout\Common\Exception\IOException If unable to write data
40 */
41 public function addRow(array $dataRow);
42
43 /**
44 * Write given data to the output and apply the given style.
45 * @see addRow
46 *
47 * @param array $dataRow Array of array containing data to be streamed.
48 * @param Style\Style $style Style to be applied to the row.
49 * @return WriterInterface
50 * @throws \Box\Spout\Common\Exception\InvalidArgumentException If the input param is not valid
51 * @throws \Box\Spout\Writer\Exception\WriterNotOpenedException If this function is called before opening the writer
52 * @throws \Box\Spout\Common\Exception\IOException If unable to write data
53 */
54 public function addRowWithStyle(array $dataRow, $style);
55
56 /**
57 * Write given data to the output. New data will be appended to end of stream.
58 *
59 * @param array $dataRows Array of array containing data to be streamed.
60 * Example $dataRow = [
61 * ['data11', 12, , '', 'data13'],
62 * ['data21', 'data22', null],
63 * ];
64 * @return WriterInterface
65 * @throws \Box\Spout\Common\Exception\InvalidArgumentException If the input param is not valid
66 * @throws \Box\Spout\Writer\Exception\WriterNotOpenedException If the writer has not been opened yet
67 * @throws \Box\Spout\Common\Exception\IOException If unable to write data
68 */
69 public function addRows(array $dataRows);
70
71 /**
72 * Write given data to the output and apply the given style.
73 * @see addRows
74 *
75 * @param array $dataRows Array of array containing data to be streamed.
76 * @param Style\Style $style Style to be applied to the rows.
77 * @return WriterInterface
78 * @throws \Box\Spout\Common\Exception\InvalidArgumentException If the input param is not valid
79 * @throws \Box\Spout\Writer\Exception\WriterNotOpenedException If this function is called before opening the writer
80 * @throws \Box\Spout\Common\Exception\IOException If unable to write data
81 */
82 public function addRowsWithStyle(array $dataRows, $style);
83
84 /**
85 * Closes the writer. This will close the streamer as well, preventing new data
86 * to be written to the file.
87 *
88 * @return void
89 */
90 public function close();
91 }
92