1 | <?php |
||
8 | class Carbon_Pagination_Presenter { |
||
9 | |||
10 | /** |
||
11 | * @var Carbon_Pagination |
||
12 | * |
||
13 | * The pagination object. |
||
14 | */ |
||
15 | protected $pagination; |
||
16 | |||
17 | /** |
||
18 | * Constructor. |
||
19 | * |
||
20 | * Sets the pagination that will be displayed or rendered. |
||
21 | * |
||
22 | * @param Carbon_Pagination_HTML $pagination Pagination object that will be displayed. |
||
23 | */ |
||
24 | 1 | public function __construct( Carbon_Pagination_HTML $pagination ) { |
|
27 | |||
28 | /** |
||
29 | * Retrieve the pagination object. |
||
30 | * |
||
31 | * @return Carbon_Pagination_HTML $pagination The pagination object. |
||
32 | */ |
||
33 | 1 | public function get_pagination() { |
|
36 | |||
37 | /** |
||
38 | * Modify the pagination object. |
||
39 | * |
||
40 | * @param Carbon_Pagination_HTML $pagination The pagination object. |
||
41 | */ |
||
42 | 1 | public function set_pagination( $pagination ) { |
|
45 | |||
46 | /** |
||
47 | * Verify if the pagination is ready for presentation. |
||
48 | * |
||
49 | * @return bool|WP_Error $result True if everything is fine, false or WP_Error on failure. |
||
50 | */ |
||
51 | 4 | public function verify_pagination() { |
|
69 | |||
70 | /** |
||
71 | * Render the pagination. |
||
72 | * |
||
73 | * @return string $output The output of the pagination, or WP_Error on failure. |
||
74 | */ |
||
75 | 2 | public function render() { |
|
94 | |||
95 | /** |
||
96 | * Build, configure and display a new pagination. |
||
97 | * |
||
98 | * @static |
||
99 | * @param string $pagination The pagination type, can be one of the following: |
||
100 | * - Posts |
||
101 | * - Post |
||
102 | * - Comments |
||
103 | * - Custom |
||
104 | * @param array $args Configuration options to modify the pagination settings. |
||
105 | * @param bool $echo Whether to display or return the output. True will display, false will return. |
||
106 | * @see Carbon_Pagination::__construct() |
||
107 | */ |
||
108 | 3 | public static function display( $pagination, $args = array(), $echo = true ) { |
|
127 | |||
128 | } |