PHP Класс GraphQL\Examples\Blog\Data\DataSource

This is just a simple in-memory data holder for the sake of example. Data layer for real app may use Doctrine or query the database directly (e.g. in CQRS style)
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
countComments ( $storyId )
countReplies ( $commentId )
findComment ( $id )
findComments ( $storyId, $limit = 5, $afterId = null )
findLastStoryFor ( $authorId )
findLatestStory ( )
findLikes ( $storyId, $limit )
findReplies ( $commentId, $limit = 5, $afterId = null )
findStories ( $limit, $afterId = null )
findStory ( $id )
findStoryMentions ( $storyId )
findUser ( $id )
getUserPhoto ( $userId, $size )
init ( )
isLikedBy ( $storyId, $userId )

Описание методов

countComments() публичный статический Метод

public static countComments ( $storyId )

countReplies() публичный статический Метод

public static countReplies ( $commentId )

findComment() публичный статический Метод

public static findComment ( $id )

findComments() публичный статический Метод

public static findComments ( $storyId, $limit = 5, $afterId = null )

findLastStoryFor() публичный статический Метод

public static findLastStoryFor ( $authorId )

findLatestStory() публичный статический Метод

public static findLatestStory ( )

findLikes() публичный статический Метод

public static findLikes ( $storyId, $limit )

findReplies() публичный статический Метод

public static findReplies ( $commentId, $limit = 5, $afterId = null )

findStories() публичный статический Метод

public static findStories ( $limit, $afterId = null )

findStory() публичный статический Метод

public static findStory ( $id )

findStoryMentions() публичный статический Метод

public static findStoryMentions ( $storyId )

findUser() публичный статический Метод

public static findUser ( $id )

getUserPhoto() публичный статический Метод

public static getUserPhoto ( $userId, $size )

init() публичный статический Метод

public static init ( )

isLikedBy() публичный статический Метод

public static isLikedBy ( $storyId, $userId )