# wp-optimize/3.2.3/vendor/rosell-dk/webp-convert/src/Options/ArrayOption.php

WP-Optimize – Cache, Compress images, Minify &amp; Clean database to boost page speed &amp; performance, version 3.2.3. 42 lines.

- Page: https://pluginprobe.com/plugins/wp-optimize/3.2.3/code/vendor/rosell-dk/webp-convert/src/Options/ArrayOption.php
- Raw: https://pluginprobe.com/plugins/wp-optimize/3.2.3/raw/vendor/rosell-dk/webp-convert/src/Options/ArrayOption.php
- Modified: 2021-11-30T14:57:30+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-optimize/3.2.3/code/vendor/rosell-dk/webp-convert/src/Options/ArrayOption.php#L10-L20`.

```php
<?php

namespace WebPConvert\Options;

use WebPConvert\Options\Option;
use WebPConvert\Options\Exceptions\InvalidOptionValueException;

/**
 * Abstract option class
 *
 * @package    WebPConvert
 * @author     Bjørn Rosell <it@rosell.dk>
 * @since      Class available since Release 2.0.0
 */
class ArrayOption extends Option
{

    protected $typeId = 'array';
    protected $schemaType = ['array'];

    public function check()
    {
        $this->checkType('array');
    }

    public function getValueForPrint()
    {
        if (count($this->getValue()) == 0) {
            return '(empty array)';
        } else {
            return parent::getValueForPrint();
        }
    }

    public function getDefinition()
    {
        $obj = parent::getDefinition();
        $obj['sensitive'] = false;
        return $obj;
    }
}

```
