Created
April 13, 2011 13:25
-
-
Save paulchubatyy/917533 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Model_Builder_Comment extends Jelly_Builder { | |
public function get_user_posts_comments(Model_Author $author) | |
{ | |
// Get author's posts ids | |
$post_ids = $author->get('posts')->as_array('id'); | |
// Get the comments that belong to these posts | |
return $this->where('post_id', 'IN', $post_ids); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment