2016-03-23 19:37:19 +00:00
|
|
|
<?php
|
|
|
|
|
2023-03-11 16:27:07 +00:00
|
|
|
namespace src\PointToolsBundle\Exception\Factory\Blog;
|
2016-03-23 19:37:19 +00:00
|
|
|
|
2023-03-11 16:27:07 +00:00
|
|
|
use src\PointToolsBundle\DTO\Api\Post;
|
|
|
|
use src\PointToolsBundle\Exception\Factory\Blog\InvalidDataException;
|
2016-03-23 19:37:19 +00:00
|
|
|
|
2017-01-09 18:43:41 +00:00
|
|
|
class InvalidPostDataException extends InvalidDataException
|
2016-03-23 19:37:19 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var Post
|
|
|
|
*/
|
|
|
|
private $post;
|
|
|
|
|
2017-01-15 02:54:38 +00:00
|
|
|
public function __construct($message = '', Post $post, $code = 0, \Exception $previous = null)
|
2016-03-23 19:37:19 +00:00
|
|
|
{
|
|
|
|
$this->post = $post;
|
|
|
|
|
|
|
|
parent::__construct($message, $code, $previous);
|
|
|
|
}
|
|
|
|
|
2017-01-09 18:43:41 +00:00
|
|
|
public function getPost(): Post
|
2016-03-23 19:37:19 +00:00
|
|
|
{
|
|
|
|
return $this->post;
|
|
|
|
}
|
|
|
|
}
|