PrivateBin\Model\Paste::getComment PHP Method

getComment() public method

Get a comment, optionally a specific instance.
public getComment ( string $parentId, string $commentId = null ) : Comment
$parentId string
$commentId string
return Comment
    public function getComment($parentId, $commentId = null)
    {
        if (!$this->exists()) {
            throw new Exception('Invalid data.', 62);
        }
        $comment = new Comment($this->_conf, $this->_store);
        $comment->setPaste($this);
        $comment->setParentId($parentId);
        if ($commentId !== null) {
            $comment->setId($commentId);
        }
        return $comment;
    }