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.
*/
namespace Magento\AdminNotification\Observer;
use Magento\Framework\Event\ObserverInterface;
/**
* AdminNotification observer
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
*/
class PredispatchAdminActionControllerObserver implements ObserverInterface
{
/**
* @var \Magento\AdminNotification\Model\FeedFactory
*/
protected $_feedFactory;
/**
* @var \Magento\Backend\Model\Auth\Session
*/
protected $_backendAuthSession;
/**
* @param \Magento\AdminNotification\Model\FeedFactory $feedFactory
* @param \Magento\Backend\Model\Auth\Session $backendAuthSession
*/
public function __construct(
\Magento\AdminNotification\Model\FeedFactory $feedFactory,
\Magento\Backend\Model\Auth\Session $backendAuthSession
) {
$this->_feedFactory = $feedFactory;
$this->_backendAuthSession = $backendAuthSession;
}
/**
* Predispatch admin action controller
*
* @param \Magento\Framework\Event\Observer $observer
* @return void
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function execute(\Magento\Framework\Event\Observer $observer)
{
if ($this->_backendAuthSession->isLoggedIn()) {
$feedModel = $this->_feedFactory->create();
/* @var $feedModel \Magento\AdminNotification\Model\Feed */
$feedModel->checkUpdate();
}
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* Copyright Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\AdminNotification\Observer;
use Magento\Framework\Event\ObserverInterface;
/**
* AdminNotification observer
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
*/
class PredispatchAdminActionControllerObserver implements ObserverInterface
{
/**
* @var \Magento\AdminNotification\Model\FeedFactory
*/
protected $_feedFactory;
/**
* @var \Magento\Backend\Model\Auth\Session
*/
protected $_backendAuthSession;
/**
* @param \Magento\AdminNotification\Model\FeedFactory $feedFactory
* @param \Magento\Backend\Model\Auth\Session $backendAuthSession
*/
public function __construct(
\Magento\AdminNotification\Model\FeedFactory $feedFactory,
\Magento\Backend\Model\Auth\Session $backendAuthSession
) {
$this->_feedFactory = $feedFactory;
$this->_backendAuthSession = $backendAuthSession;
}
/**
* Predispatch admin action controller
*
* @param \Magento\Framework\Event\Observer $observer
* @return void
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function execute(\Magento\Framework\Event\Observer $observer)
{
if ($this->_backendAuthSession->isLoggedIn()) {
$feedModel = $this->_feedFactory->create();
/* @var $feedModel \Magento\AdminNotification\Model\Feed */
$feedModel->checkUpdate();
}
}
}
Function Calls
| None |
Stats
| MD5 | 8ae4db297103cc425be9be7932a68452 |
| Eval Count | 0 |
| Decode Time | 139 ms |