GraphQL\Examples\Blog\Data\DataSource::countReplies PHP Method

countReplies() public static method

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

Usage Example

コード例 #1
0
ファイル: CommentType.php プロジェクト: aeshion/ZeroPHP
 public function totalReplyCount(Comment $comment)
 {
     return DataSource::countReplies($comment->id);
 }