Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /** * Copyright Magento, Inc. All rights reserved. * See COPYING.txt for license ..
Decoded Output download
<?php
/**
* Copyright Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
namespace Magento\Backend\Model\Image;
/**
* Image uploader config provider.
*/
class UploadResizeConfig implements UploadResizeConfigInterface
{
/**
* Config path for the maximal image width value
*/
const XML_PATH_MAX_WIDTH_IMAGE = 'system/upload_configuration/max_width';
/**
* Config path for the maximal image height value
*/
const XML_PATH_MAX_HEIGHT_IMAGE = 'system/upload_configuration/max_height';
/**
* Config path for the maximal image height value
*/
const XML_PATH_ENABLE_RESIZE = 'system/upload_configuration/enable_resize';
/**
* @var \Magento\Framework\App\Config\ScopeConfigInterface
*/
private $config;
/**
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
*/
public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $config)
{
$this->config = $config;
}
/**
* Get maximal width value for resized image
*
* @return int
*/
public function getMaxWidth(): int
{
return (int)$this->config->getValue(self::XML_PATH_MAX_WIDTH_IMAGE);
}
/**
* Get maximal height value for resized image
*
* @return int
*/
public function getMaxHeight(): int
{
return (int)$this->config->getValue(self::XML_PATH_MAX_HEIGHT_IMAGE);
}
/**
* Get config value for frontend resize
*
* @return bool
*/
public function isResizeEnabled(): bool
{
return (bool)$this->config->getValue(self::XML_PATH_ENABLE_RESIZE);
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* Copyright Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
namespace Magento\Backend\Model\Image;
/**
* Image uploader config provider.
*/
class UploadResizeConfig implements UploadResizeConfigInterface
{
/**
* Config path for the maximal image width value
*/
const XML_PATH_MAX_WIDTH_IMAGE = 'system/upload_configuration/max_width';
/**
* Config path for the maximal image height value
*/
const XML_PATH_MAX_HEIGHT_IMAGE = 'system/upload_configuration/max_height';
/**
* Config path for the maximal image height value
*/
const XML_PATH_ENABLE_RESIZE = 'system/upload_configuration/enable_resize';
/**
* @var \Magento\Framework\App\Config\ScopeConfigInterface
*/
private $config;
/**
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
*/
public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $config)
{
$this->config = $config;
}
/**
* Get maximal width value for resized image
*
* @return int
*/
public function getMaxWidth(): int
{
return (int)$this->config->getValue(self::XML_PATH_MAX_WIDTH_IMAGE);
}
/**
* Get maximal height value for resized image
*
* @return int
*/
public function getMaxHeight(): int
{
return (int)$this->config->getValue(self::XML_PATH_MAX_HEIGHT_IMAGE);
}
/**
* Get config value for frontend resize
*
* @return bool
*/
public function isResizeEnabled(): bool
{
return (bool)$this->config->getValue(self::XML_PATH_ENABLE_RESIZE);
}
}
Function Calls
None |
Stats
MD5 | ea440473d465633460514caa9def0c37 |
Eval Count | 0 |
Decode Time | 99 ms |