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

getUserPhoto() 공개 정적인 메소드

public static getUserPhoto ( $userId, $size )
    public static function getUserPhoto($userId, $size)
    {
        return new Image(['id' => $userId, 'type' => Image::TYPE_USERPIC, 'size' => $size, 'width' => rand(100, 200), 'height' => rand(100, 200)]);
    }

Usage Example

예제 #1
0
 public function photo(User $user, $args)
 {
     return DataSource::getUserPhoto($user->id, $args['size']);
 }