PHP Class Timber\PostCollection

Inheritance: extends ArrayObject
Show file Open project: jarednova/timber Class Usage Examples

Public Methods

Method Description
__construct ( $posts = [], $post_class = '\Timber\Post' )
get_posts ( )
maybe_set_preview ( array $posts ) : array

Protected Methods

Method Description
init ( $posts, $post_class )

Method Details

__construct() public method

public __construct ( $posts = [], $post_class = '\Timber\Post' )

get_posts() public method

public get_posts ( )

init() protected static method

protected static init ( $posts, $post_class )

maybe_set_preview() public static method

public static maybe_set_preview ( array $posts ) : array
$posts array
return array