cvs: pear /Structures_DataGrid DataGrid.php

From: Date: Fri, 24 Feb 2006 10:01:19 +0000
Subject: cvs: pear /Structures_DataGrid DataGrid.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38556@lists.php.net to get a copy of this message
wiesemann Fri Feb 24 10:01:19 2006 UTC Modified files: /pear/Structures_DataGrid DataGrid.php Log: - new method getColumnCount() - phpdoc fixes (wrong data types) http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid.php?r1=1.37&r2=1.38&diff_format=u Index: pear/Structures_DataGrid/DataGrid.php diff -u pear/Structures_DataGrid/DataGrid.php:1.37 pear/Structures_DataGrid/DataGrid.php:1.38 --- pear/Structures_DataGrid/DataGrid.php:1.37 Thu Feb 23 14:08:34 2006 +++ pear/Structures_DataGrid/DataGrid.php Fri Feb 24 10:01:18 2006 @@ -18,7 +18,7 @@ // | Mark Wiesemann <wiesemann@php.net> | // +----------------------------------------------------------------------+ // -// $Id: DataGrid.php,v 1.37 2006/02/23 14:08:34 olivierg Exp $ +// $Id: DataGrid.php,v 1.38 2006/02/24 10:01:18 wiesemann Exp $ require_once 'PEAR.php'; @@ -72,7 +72,7 @@ * ?> * </code> * - * @version $Revision: 1.37 $ + * @version $Revision: 1.38 $ * @author Andrew S. Nagy <asnagy@webitecture.org> * @author Olivier Guilyardi <olivier@samalyse.com> * @author Mark Wiesemann <wiesemann@php.net> @@ -486,7 +486,7 @@ /** * Retrieves the current page number when paging is implemented * - * @return string the current page number + * @return int the current page number * @access public */ function getCurrentPage() @@ -498,7 +498,7 @@ * Define the current page number. This is used when paging is implemented * * @access public - * @param string $page The current page number. + * @param mixed $page The current page number (as string or int). */ function setCurrentPage($page) { @@ -509,7 +509,7 @@ * Returns the total number of pages * (returns 0 if there are no records, returns 1 if there is no row limit) * - * @return string the total number of pages + * @return int the total number of pages * @access public */ function getPageCount() @@ -520,11 +520,22 @@ return ceil($this->getRecordCount() / $this->rowLimit); } } - + + /** + * Returns the number of columns + * + * @return int the number of records + * @access public + */ + function getColumnCount() + { + return count($this->columnSet); + } + /** * Returns the total number of records * - * @return string the total number of records + * @return int the total number of records * @access public */ function getRecordCount() @@ -540,7 +551,7 @@ * Returns the number of the first record of the current page * (returns 0 if there are no records, returns 1 if there is no row limit) * - * @return string the number of the first record currently shown + * @return int the number of the first record currently shown * @access public */ function getCurrentRecordNumberStart() @@ -557,7 +568,7 @@ /** * Returns the number of the last record of the current page * - * @return string the number of the last record currently shown + * @return int the number of the last record currently shown * @access public */ function getCurrentRecordNumberEnd()

« previous php.pear.cvs (#38556) next »