Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions src/Address/Address.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
<?php
/**
* Created by PhpStorm.
* User: alex
* Date: 07.12.16
* Time: 22:14
*/

namespace Conversio\Mail\Address;

/**
* Class Address
* @package Conversio\Mail\Address
*/
class Address
class Address implements \JsonSerializable
{
/**
* @var string $address
Expand Down Expand Up @@ -71,4 +65,16 @@ public function equals(self $address): bool
{
return $this->getAddress() === $address->getAddress();
}

/**
* Specify data which should be serialized to JSON
* @link http://php.net/manual/en/jsonserializable.jsonserialize.php
* @return mixed data which can be serialized by <b>json_encode</b>,
* which is a value of any type other than a resource.
* @since 5.4.0
*/
public function jsonSerialize()
{
return get_object_vars($this);
}
}
6 changes: 0 additions & 6 deletions src/Address/AddressContainer.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* Created by PhpStorm.
* User: alex
* Date: 07.12.16
* Time: 22:13
*/

namespace Conversio\Mail\Address;

Expand Down
164 changes: 0 additions & 164 deletions src/Assistant/Assistant.php

This file was deleted.

6 changes: 0 additions & 6 deletions src/Attachment/AttachmentContainer.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* Created by PhpStorm.
* User: alex
* Date: 08.12.16
* Time: 20:54
*/

namespace Conversio\Mail\Attachment;

Expand Down
6 changes: 0 additions & 6 deletions src/Attachment/AttachmentInterface.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* Created by PhpStorm.
* User: alex
* Date: 13.12.16
* Time: 21:10
*/

namespace Conversio\Mail\Attachment;

Expand Down
16 changes: 10 additions & 6 deletions src/Container/AbstractContainer.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php
/**
* Created by PhpStorm.
* User: alex
* Date: 13.12.16
* Time: 20:57
*/

namespace Conversio\Mail\Container;

/**
* Class AbstractContainer
* @package Conversio\Mail\Container
*/
abstract class AbstractContainer
{
/**
Expand Down Expand Up @@ -37,4 +36,9 @@ public function asArray(): array
{
return $this->store;
}

public function clear(): void
{
$this->store = [];
}
}
22 changes: 16 additions & 6 deletions src/Content.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* Created by PhpStorm.
* User: alex
* Date: 08.12.16
* Time: 20:45
*/

namespace Conversio\Mail;

Expand Down Expand Up @@ -55,4 +49,20 @@ public function setText(string $text)
{
$this->text = $text;
}

/**
* @return bool
*/
public function hasHtmlContent(): bool
{
return $this->html !== '';
}

/**
* @return bool
*/
public function hasTextContent(): bool
{
return $this->text !== '';
}
}
Loading