OneCommentQuery.php 853 Bytes
<?php

namespace FootyRoom\Queries\Comment;

/**
 * Query to return a specific comment.
 */
class OneCommentQuery implements WithUserQuery
{
    use ViewedBy;
    use WithUser;

    /**
     * @var int
     */
    protected $commentId;

    /**
     * Optional comment meta keys to return.
     *
     * @var string[]
     */
    protected $meta = [];

    /**
     * Constructor.
     *
     * @param int $commentId
     */
    public function __construct($commentId)
    {
        $this->commentId = $commentId;
    }

    /**
     * Gets the value of commentId.
     *
     * @return int
     */
    public function getCommentId()
    {
        return $this->commentId;
    }

    /**
     * Gets the Optional comment meta keys to return.
     *
     * @return string[]
     */
    public function getMeta()
    {
        return $this->meta;
    }
}