PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 3.2.5
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v3.2.5
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / vendor / rosell-dk / webp-convert / tests / Convert / Exposers / AbstractConverterExposer.php

AbstractConverterExposer.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 3.2.5, at vendor/rosell-dk/webp-convert/tests/Convert/Exposers/AbstractConverterExposer.php

64 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WebPConvert\Tests\Convert\Exposers;
4
5 use WebPConvert\Convert\Converters\AbstractConverter;
6 use WebPConvert\Tests\BaseExposer;
7
8 /**
9 * Class for exposing otherwise unaccessible methods of AbstractConverter,
10 * - so they can be tested
11 *
12 * TODO: expose and test more methods! (and make more methods private/protected in AbstractConverter)
13 */
14 class AbstractConverterExposer extends BaseExposer {
15
16 //public static $extraOptions = [];
17
18 public $converter;
19 public static $currentlyCalling;
20
21 public function __construct($converter)
22 {
23 parent::__construct($converter);
24 }
25
26 public function getSource()
27 {
28 return $this->getPrivateProperty('source');
29 }
30
31 public function isOperating()
32 {
33 $inject = function() {
34 try {
35 $this->checkOperationality();
36 $this->checkConvertability();
37 } catch (\Exception $e) {
38 return false;
39 }
40 return true;
41 };
42 return $this->bindDynamicFunctionToObjectAndCallIt($inject);
43 }
44
45 /*
46 public function prepareOptions()
47 {
48 $this->callPrivateFunction('prepareOptions', AbstractConverter::class);
49 }*/
50
51 public function getOptions()
52 {
53 return $this->getPrivateProperty('options', AbstractConverter::class);
54 }
55
56 /*
57 public function getDefaultOptions()
58 {
59 //return $this->getPrivateStaticProperty('defaultOptions', AbstractConverter::class);
60 return $this->callPrivateFunction('getDefaultOptions', AbstractConverter::class);
61 }*/
62
63 }
64