PagerDefaultAdapter Class Reference
[Controller]
Default Implementation of Pager adapter. More...
Inheritance diagram for
PagerDefaultAdapter:
Public Member Functions |
|
__construct (PageData $page_data, $parameter= 'page') | |
get_current_page () | |
Return current page. |
|
get_url_for_page ($page) | |
Compute url for page. |
|
Static Public Member Functions |
|
static | apply_to_url ($url, $page, $parameter= 'page') |
Prepare URL so filter gets applied. |
|
Protected Attributes |
|
$get | |
$parameter |
Detailed Description
Default Implementation of Pager adapter.
Uses GET-Parameters as pager parameters
Definition at line 179 of file pager.cls.php.
Constructor & Destructor Documentation
PagerDefaultAdapter::__construct | ( | PageData $ | page_data, | |
$ | parameter = 'page' |
|||
) |
Definition at line 183 of file pager.cls.php.
00183 { 00184 $this->parameter = $parameter; 00185 $this->get = $page_data->get_get(); 00186 }
Member Function Documentation
static PagerDefaultAdapter::apply_to_url | ( | $ | url, | |
$ | page, | |||
$ | parameter = 'page' |
|||
) | [static] |
Prepare URL so filter gets applied.
- Returns:
- void
Definition at line 217 of file pager.cls.php.
00217 { 00218 $p = Cast::int($page); 00219 if ($p <= 1) { 00220 $p = ''; 00221 } 00222 $url->replace_query_parameter($parameter, $p); 00223 }
PagerDefaultAdapter::get_current_page | ( | ) |
Return current page.
- Parameters:
-
PageData $page_data
- Returns:
- int
Implements IPagerAdapter.
Definition at line 194 of file pager.cls.php.
PagerDefaultAdapter::get_url_for_page | ( | $ | page | ) |
Compute url for page.
- Returns:
- Url
Implements IPagerAdapter.
Definition at line 203 of file pager.cls.php.
00203 { 00204 $url = Url::current(); 00205 self::apply_to_url($url, $page, $this->parameter); 00206 return $url; 00207 }
Member Data Documentation
PagerDefaultAdapter::$get
[protected] |
Definition at line 181 of file pager.cls.php.
PagerDefaultAdapter::$parameter
[protected] |
Definition at line 180 of file pager.cls.php.
The documentation for this class was generated from the following file:
- gyro/core/controller/tools/pager.cls.php