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.
*/
/**
* Product type factory
*/
namespace Magento\Catalog\Model\Product\Type;
class Pool
{
/**
* Object Manager
*
* @var \Magento\Framework\ObjectManagerInterface
*/
protected $_objectManager;
/**
* Construct
*
* @param \Magento\Framework\ObjectManagerInterface $objectManager
*/
public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager)
{
$this->_objectManager = $objectManager;
}
/**
* Gets product of particular type
*
* @param string $className
* @param array $data
* @return \Magento\Catalog\Model\Product\Type\AbstractType
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function get($className, array $data = [])
{
$product = $this->_objectManager->get($className, $data);
if (!$product instanceof \Magento\Catalog\Model\Product\Type\AbstractType) {
throw new \Magento\Framework\Exception\LocalizedException(
__('%1 doesn\'t extends \Magento\Catalog\Model\Product\Type\AbstractType', $className)
);
}
return $product;
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* Copyright Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* Product type factory
*/
namespace Magento\Catalog\Model\Product\Type;
class Pool
{
/**
* Object Manager
*
* @var \Magento\Framework\ObjectManagerInterface
*/
protected $_objectManager;
/**
* Construct
*
* @param \Magento\Framework\ObjectManagerInterface $objectManager
*/
public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager)
{
$this->_objectManager = $objectManager;
}
/**
* Gets product of particular type
*
* @param string $className
* @param array $data
* @return \Magento\Catalog\Model\Product\Type\AbstractType
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function get($className, array $data = [])
{
$product = $this->_objectManager->get($className, $data);
if (!$product instanceof \Magento\Catalog\Model\Product\Type\AbstractType) {
throw new \Magento\Framework\Exception\LocalizedException(
__('%1 doesn\'t extends \Magento\Catalog\Model\Product\Type\AbstractType', $className)
);
}
return $product;
}
}
Function Calls
None |
Stats
MD5 | b19d29f818676fce0bf54fed2778b73a |
Eval Count | 0 |
Decode Time | 102 ms |