Programming Language PHP

Namespace Oro\Component\Config\Common

Class ConfigObject

Total Examples 2

2 code examples of PHP Oro\Component\Config\Common\ConfigObject extracted from open source projects

Was this example useful?
0
                                                    protected function getConfigObject(): ConfigObject
    {
        return ConfigObject::create(
            [
                'true'  => true,
                'false' => false,
                'null'  => null,
                'array' => [
                    'true'  => true,
                    'false' => false,
                    'null'  => null,
                ],
            ]
        );
    }
                                            
Was this example useful?
0
                                                    /**
     * @throws ConversionException
     */
    public function convertToPHPValue($value, AbstractPlatform $platform): mixed
    {
        if (null === $value) {
            return null;
        }

        $convertedValue = parent::convertToPHPValue($value, $platform);
        if (!is_array($convertedValue)) {
            throw ConversionException::conversionFailed($value, $this->getName());
        }

        return ConfigObject::create($convertedValue);
    }
                                            
ConfigObject's Other Methods
ConfigObject's Other Methods