1 parent
2ad19f4793
commit
9a6d257de0
9 files changed
+393
-1
No files matched your search
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Calendar;
|
||||
|
||||
use App\Post;
|
||||
use DateTime;
|
||||
|
||||
class Day
|
||||
{
|
||||
/** @var DateTime */
|
||||
protected $date;
|
||||
/** @var Post|null */
|
||||
protected $post;
|
||||
|
||||
/**
|
||||
* Day constructor.
|
||||
* @param DateTime $date
|
||||
* @param Post $post
|
||||
*/
|
||||
public function __construct(DateTime $date, Post $post = null)
|
||||
{
|
||||
$this->date = $date;
|
||||
$this->post = $post;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DateTime
|
||||
*/
|
||||
public function getDate(): DateTime
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Post
|
||||
*/
|
||||
public function getPost(): ?Post
|
||||
{
|
||||
return $this->post;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user