Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/dev/tests/integration/_files/Magento/TestModuleMysqlMq/Model/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/old/dev/tests/integration/_files/Magento/TestModuleMysqlMq/Model/Processor.php
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Magento\TestModuleMysqlMq\Model;

use LogicException;
use Magento\Framework\MessageQueue\ConnectionLostException;

/**
 * Test message processor is used by \Magento\MysqlMq\Model\PublisherConsumerTest
 */
class Processor
{
    /**
     * @param DataObject $message
     */
    public function processMessage($message)
    {
        file_put_contents(
            $message->getOutputPath(),
            "Processed {$message->getEntityId()}" . PHP_EOL,
            FILE_APPEND
        );
    }

    /**
     * @param DataObject $message
     */
    public function processObjectCreated($message)
    {
        file_put_contents(
            $message->getOutputPath(),
            "Processed object created {$message->getEntityId()}" . PHP_EOL,
            FILE_APPEND
        );
    }

    /**
     * @param DataObject $message
     */
    public function processCustomObjectCreated($message)
    {
        file_put_contents(
            $message->getOutputPath(),
            "Processed custom object created {$message->getEntityId()}" . PHP_EOL,
            FILE_APPEND
        );
    }

    /**
     * @param DataObject $message
     */
    public function processObjectUpdated($message)
    {
        file_put_contents(
            $message->getOutputPath(),
            "Processed object updated {$message->getEntityId()}" . PHP_EOL,
            FILE_APPEND
        );
    }

    /**
     * @param DataObject $message
     */
    public function processMessageWithException($message)
    {
        file_put_contents($message->getOutputPath(), "Exception processing {$message->getEntityId()}");
        throw new LogicException(
            "Exception during message processing happened. Entity: {{$message->getEntityId()}}"
        );
    }

    /**
     * @throws ConnectionLostException
     */
    public function processMessageWithConnectionException()
    {
        throw new ConnectionLostException(
            "Connection exception during message processing happened."
        );
    }
}

Spamworldpro Mini