Timber\PostCollection::get_posts PHP Method

get_posts() public method

public get_posts ( )
    public function get_posts()
    {
        return $this->getArrayCopy();
    }

Usage Example

Example #1
0
 public function get_posts($return_collection = false)
 {
     if (isset($this->_query->posts)) {
         $posts = new PostCollection($this->_query->posts, $this->_posts_class);
         return $return_collection ? $posts : $posts->get_posts();
     }
 }