GraphQL\Examples\Blog\Data\DataSource::countComments PHP 메소드

countComments() 공개 정적인 메소드

public static countComments ( $storyId )
    public static function countComments($storyId)
    {
        return isset(self::$storyComments[$storyId]) ? count(self::$storyComments[$storyId]) : 0;
    }

Usage Example

예제 #1
0
 public function totalCommentCount(Story $story)
 {
     return DataSource::countComments($story->id);
 }