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

countComments() public static method

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

Usage Example

コード例 #1
0
ファイル: StoryType.php プロジェクト: aeshion/ZeroPHP
 public function totalCommentCount(Story $story)
 {
     return DataSource::countComments($story->id);
 }