# imagify/2.2/classes/Dependencies/League/Container/Argument/ClassNameWithOptionalValue.php

Imagify Image Optimization: Optimize Images | Compress &amp; Convert to WebP/AVIF, version 2.2. 40 lines.

- Page: https://pluginprobe.com/plugins/imagify/2.2/code/classes/Dependencies/League/Container/Argument/ClassNameWithOptionalValue.php
- Raw: https://pluginprobe.com/plugins/imagify/2.2/raw/classes/Dependencies/League/Container/Argument/ClassNameWithOptionalValue.php
- Modified: 2024-03-06T17:27:56+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/imagify/2.2/code/classes/Dependencies/League/Container/Argument/ClassNameWithOptionalValue.php#L10-L20`.

```php
<?php

namespace Imagify\Dependencies\League\Container\Argument;

class ClassNameWithOptionalValue implements ClassNameInterface
{
    /**
     * @var string
     */
    private $className;

    /**
     * @var mixed
     */
    private $optionalValue;

    /**
     * @param string $className
     * @param mixed $optionalValue
     */
    public function __construct(string $className, $optionalValue)
    {
        $this->className = $className;
        $this->optionalValue = $optionalValue;
    }

    /**
     * @inheritDoc
     */
    public function getClassName(): string
    {
        return $this->className;
    }

    public function getOptionalValue()
    {
        return $this->optionalValue;
    }
}

```
