GraphQL\Examples\Blog\Data\DataSource::countReplies PHP Méthode

countReplies() public static méthode

public static countReplies ( $commentId )
    public static function countReplies($commentId)
    {
        return isset(self::$commentReplies[$commentId]) ? count(self::$commentReplies[$commentId]) : 0;
    }

Usage Example

Exemple #1
0
 public function totalReplyCount(Comment $comment)
 {
     return DataSource::countReplies($comment->id);
 }