class-rio-attachment-extra-data.php
7 months ago
class-rio-base-active-record.php
7 months ago
class-rio-base-extra-data.php
7 months ago
class-rio-base-helper.php
7 months ago
class-rio-base-object.php
7 months ago
class-rio-process-queue-table.php
1 month ago
class-rio-server-smushit-extra-data.php
7 months ago
class.webp-extra-data.php
7 months ago
class-rio-attachment-extra-data.php
89 lines
| 1 | <?php |
| 2 | |
| 3 | // Exit if accessed directly |
| 4 | if ( ! defined( 'ABSPATH' ) ) { |
| 5 | exit; |
| 6 | } |
| 7 | |
| 8 | /** |
| 9 | * Class RIO_Attachment_Extra_Data is a DTO model for `attachment` post type used for `extra_data` |
| 10 | * property in RIO_Process_Queue. |
| 11 | * |
| 12 | * @see RIO_Process_Queue::$extra_data for further information |
| 13 | */ |
| 14 | class RIO_Attachment_Extra_Data extends RIO_Base_Extra_Data { |
| 15 | |
| 16 | protected $error = null; |
| 17 | protected $error_msg = null; |
| 18 | protected $thumbnails_count = null; |
| 19 | protected $original_main_size = null; |
| 20 | protected $main_optimized_data = null; |
| 21 | protected $thumbnails_optimized_data = null; |
| 22 | protected $webp_main_size = null; |
| 23 | protected $avif_main_size = null; |
| 24 | |
| 25 | public function get_error() { |
| 26 | return $this->error; |
| 27 | } |
| 28 | |
| 29 | public function set_error( $error ) { |
| 30 | $this->error = $error; |
| 31 | } |
| 32 | |
| 33 | public function get_error_msg() { |
| 34 | return $this->error_msg; |
| 35 | } |
| 36 | |
| 37 | public function set_error_msg( $error_msg ) { |
| 38 | $this->error_msg = $error_msg; |
| 39 | } |
| 40 | |
| 41 | public function get_thumbnails_count() { |
| 42 | return $this->thumbnails_count; |
| 43 | } |
| 44 | |
| 45 | public function set_thumbnails_count( $thumbnails_count ) { |
| 46 | $this->thumbnails_count = $thumbnails_count; |
| 47 | } |
| 48 | |
| 49 | public function get_original_main_size() { |
| 50 | return $this->original_main_size; |
| 51 | } |
| 52 | |
| 53 | public function set_original_main_size( $original_main_size ) { |
| 54 | $this->original_main_size = $original_main_size; |
| 55 | } |
| 56 | |
| 57 | public function get_main_optimized_data() { |
| 58 | return (array) $this->main_optimized_data; |
| 59 | } |
| 60 | |
| 61 | public function set_main_optimized_data( $main_optimized_data ) { |
| 62 | $this->main_optimized_data = $main_optimized_data; |
| 63 | } |
| 64 | |
| 65 | public function get_thumbnails_optimized_data() { |
| 66 | return (array) $this->thumbnails_optimized_data; |
| 67 | } |
| 68 | |
| 69 | public function set_thumbnails_optimized_data( $thumbnails_optimized_data ) { |
| 70 | $this->thumbnails_optimized_data = $thumbnails_optimized_data; |
| 71 | } |
| 72 | |
| 73 | public function get_webp_main_size() { |
| 74 | return $this->webp_main_size; |
| 75 | } |
| 76 | |
| 77 | public function set_webp_main_size( $webp_main_size ) { |
| 78 | $this->webp_main_size = $webp_main_size; |
| 79 | } |
| 80 | |
| 81 | public function get_avif_main_size() { |
| 82 | return $this->avif_main_size; |
| 83 | } |
| 84 | |
| 85 | public function set_avif_main_size( $avif_main_size ) { |
| 86 | $this->avif_main_size = $avif_main_size; |
| 87 | } |
| 88 | } |
| 89 |