From b87c06378211d1f6b01793148617bbf7861a2c4f Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 29 Apr 2011 10:18:39 +0200 Subject: Paar Mapper angepasst --- library/Pbs/Pagination.php | 4 ++++ library/Pbs/Search.php | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'library') diff --git a/library/Pbs/Pagination.php b/library/Pbs/Pagination.php index 8d9d013..c83ec74 100644 --- a/library/Pbs/Pagination.php +++ b/library/Pbs/Pagination.php @@ -61,6 +61,7 @@ class Pbs_Pagination{ } public function setPerPage($perpage){ $this->perpage = $perpage; + return $this; } public function getPerPage(){ return $this->perpage; @@ -71,6 +72,7 @@ class Pbs_Pagination{ if($requestpage >= $this->numpages) $requestpage = $this->numpages-1; $this->requestpage = $requestpage; + return $this; } public function getRequestPage(){ return $this->requestpage; @@ -79,6 +81,7 @@ class Pbs_Pagination{ $this->element = $element; $this->maxNumber = count($element); $this->numpages = ceil(count($element)/$this->perpage); + return $this; } public function getStartItem(){ return $this->requestpage * $this->perpage; @@ -88,6 +91,7 @@ class Pbs_Pagination{ } public function setPageUrl($url){ $this->pageUrl = $url; + return $this; } } diff --git a/library/Pbs/Search.php b/library/Pbs/Search.php index 420ef7c..587b656 100644 --- a/library/Pbs/Search.php +++ b/library/Pbs/Search.php @@ -84,9 +84,11 @@ class Pbs_Search{ } public function setModule($m){ $this->module = $m; + return $this; } public function setType($t){ $this->type = $t; + return $this; } public function setSearchTerm($search){ $this->searchTerm = trim($search); @@ -117,7 +119,7 @@ class Pbs_Search{ } $this->searcha = @$searcha; $this->searchb = @$searchb; - #print_a($searcha, $searchb); + return $this; } public function getSearchTerm(){ return $this->searchTerm; -- cgit v1.2.3-55-g7522