Programming Language PHP
Namespace Oro\Component\Config\Common
Class ConfigObject
Method/Function create
Total Examples 2
2 code examples of PHP Oro\Component\Config\Common\ConfigObject::create extracted from open source projects
protected function getConfigObject(): ConfigObject
{
return ConfigObject::create(
[
'true' => true,
'false' => false,
'null' => null,
'array' => [
'true' => true,
'false' => false,
'null' => null,
],
]
);
}
/**
* @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);
}