File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+ /********************************************************************
3+ * Copyright (C) 2018 MegaOptim (https://megaoptim.com)
4+ *
5+ * This file is part of MegaOptim Image Optimizer
6+ *
7+ * MegaOptim Image Optimizer is free software: you can redistribute it and/or modify
8+ * it under the terms of the GNU General Public License as published by
9+ * the Free Software Foundation, either version 2 of the License, or
10+ * (at your option) any later version.
11+ *
12+ * MegaOptim Image Optimizer is distributed in the hope that it will be useful,
13+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+ * GNU General Public License for more details.
16+ *
17+ * You should have received a copy of the GNU General Public License
18+ * along with MegaOptim Image Optimizer. If not, see <https://www.gnu.org/licenses/>.
19+ **********************************************************************/
20+
21+ namespace MegaOptim \Responses ;
22+
23+ class ResultWebP {
24+ public $ url ;
25+ public $ optimized_size ;
26+ public $ saved_bytes ;
27+ public $ saved_percent ;
28+
29+ public function __construct ($ response ) {
30+ if (isset ($ response ->webp ) && isset ($ response ->webp ->url )) {
31+ $ this ->url = $ response ->webp ->url ;
32+ $ this ->optimized_size = $ response ->webp ->optimized_size ;
33+ $ this ->saved_bytes = $ response ->webp ->saved_bytes ;
34+ $ this ->saved_percent = $ response ->webp ->saved_percent ;
35+ }
36+ }
37+ }
You can’t perform that action at this time.
0 commit comments