Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class BlogFilter
- {
- protected $messages = array();
- public function forUpdate(BlogPost $post)
- {
- $this->messages = array();
- if (! trim($post->title)) {
- $this->messages['title'] = 'The title must not be empty.';
- return false;
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement