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 namespace Illuminate\Mail\Transport; use Illuminate\Support\Collection; use String..
Decoded Output download
<?php
namespace Illuminate\Mail\Transport;
use Illuminate\Support\Collection;
use Stringable;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\TransportInterface;
use Symfony\Component\Mime\RawMessage;
class ArrayTransport implements Stringable, TransportInterface
{
/**
* The collection of Symfony Messages.
*
* @var \Illuminate\Support\Collection
*/
protected $messages;
/**
* Create a new array transport instance.
*
* @return void
*/
public function __construct()
{
$this->messages = new Collection;
}
/**
* {@inheritdoc}
*/
public function send(RawMessage $message, ?Envelope $envelope = null): ?SentMessage
{
return $this->messages[] = new SentMessage($message, $envelope ?? Envelope::create($message));
}
/**
* Retrieve the collection of messages.
*
* @return \Illuminate\Support\Collection
*/
public function messages()
{
return $this->messages;
}
/**
* Clear all of the messages from the local collection.
*
* @return \Illuminate\Support\Collection
*/
public function flush()
{
return $this->messages = new Collection;
}
/**
* Get the string representation of the transport.
*
* @return string
*/
public function __toString(): string
{
return 'array';
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Illuminate\Mail\Transport;
use Illuminate\Support\Collection;
use Stringable;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\TransportInterface;
use Symfony\Component\Mime\RawMessage;
class ArrayTransport implements Stringable, TransportInterface
{
/**
* The collection of Symfony Messages.
*
* @var \Illuminate\Support\Collection
*/
protected $messages;
/**
* Create a new array transport instance.
*
* @return void
*/
public function __construct()
{
$this->messages = new Collection;
}
/**
* {@inheritdoc}
*/
public function send(RawMessage $message, ?Envelope $envelope = null): ?SentMessage
{
return $this->messages[] = new SentMessage($message, $envelope ?? Envelope::create($message));
}
/**
* Retrieve the collection of messages.
*
* @return \Illuminate\Support\Collection
*/
public function messages()
{
return $this->messages;
}
/**
* Clear all of the messages from the local collection.
*
* @return \Illuminate\Support\Collection
*/
public function flush()
{
return $this->messages = new Collection;
}
/**
* Get the string representation of the transport.
*
* @return string
*/
public function __toString(): string
{
return 'array';
}
}
Function Calls
None |
Stats
MD5 | 9ee98bb116e3e73a8bb7d894de6351c6 |
Eval Count | 0 |
Decode Time | 101 ms |