Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Interface to create new attachment types. |
| 5 | * |
| 6 | * This Source Code Form is subject to the terms of the Mozilla Public License, |
| 7 | * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
| 8 | * obtain one at https://mozilla.org/MPL/2.0/. |
| 9 | * |
| 10 | * @package phpMyFAQ |
| 11 | * @author Anatoliy Belsky <ab@php.net> |
| 12 | * @copyright 2009-2026 phpMyFAQ Team |
| 13 | * @license https://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
| 14 | * @link https://www.phpmyfaq.de |
| 15 | * @since 2009-08-21 |
| 16 | */ |
| 17 | |
| 18 | declare(strict_types=1); |
| 19 | |
| 20 | namespace phpMyFAQ\Attachment; |
| 21 | |
| 22 | /** |
| 23 | * Interface AttachmentInterface |
| 24 | * |
| 25 | * @package phpMyFAQ\Attachment |
| 26 | */ |
| 27 | interface AttachmentInterface |
| 28 | { |
| 29 | /** |
| 30 | * Save current attachment to the appropriate storage. |
| 31 | * |
| 32 | * @param string $filePath full path to the attachment file |
| 33 | */ |
| 34 | public function save(string $filePath): bool; |
| 35 | |
| 36 | /** |
| 37 | * Delete attachment. |
| 38 | */ |
| 39 | public function delete(): bool; |
| 40 | |
| 41 | /** |
| 42 | * Retrieve file contents into a variable. |
| 43 | */ |
| 44 | public function get(): string; |
| 45 | |
| 46 | /** |
| 47 | * Output current file to stdout. |
| 48 | */ |
| 49 | public function rawOut(): void; |
| 50 | } |