Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple News Items Support #230

Merged
merged 1 commit into from
Jan 11, 2016
Merged

Multiple News Items Support #230

merged 1 commit into from
Jan 11, 2016

Conversation

fanglinks
Copy link
Contributor

Multiple News items support like this way:

        $server->setMessageHandler(function($message){

            return [
                new News([
                    'title' => 'Title 1',
                    'description' => '...',
                    'url' => 'http://www.fanglinks.com',
                    'image' => 'http://img.fanglinks.com'
                ]),
                new News([
                    'title' => 'Title 2',
                    'description' => '...',
                    'url' => 'http://www.fanglinks.com',
                    'image' => 'http://img.fanglinks.com'
                ]),
                new News([
                    'title' => 'Title 3',
                    'description' => '...',
                    'url' => 'http://www.fanglinks.com',
                    'image' => 'http://img.fanglinks.com'
                ]),
            ];

        })->serve()->send();

@fanglinks fanglinks changed the title Multiple News Items Support, Message Handler can received array of Me… Multiple News Items Support, Message Handler can receive array of Me… Jan 10, 2016
@xiaohome
Copy link

从语意来说 还是原来的舒服

}
}
return true;
}else{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

空格

@overtrue overtrue changed the title Multiple News Items Support, Message Handler can receive array of Me… Multiple News Items Support Jan 11, 2016
overtrue added a commit that referenced this pull request Jan 11, 2016
Multiple News Items Support
@overtrue overtrue merged commit 5f54308 into w7corp:develop Jan 11, 2016
overtrue added a commit that referenced this pull request Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants