<?php
/**
* ページ情報クラス
*
* PHP version 5
*
* @package    components.charcoal
* @author     stk2k <stk2k@sazysoft.com>
* @copyright  2008 stk2k, sazysoft
*/

class PageInfo 
{
	var $_total_rows;
	var $_page;
	var $_rows_per_page;
	var $_base_url;

	/*
	 * コンストラクタ
	 */
	public function __construct( $toal_rows, $page, $rows_per_page, URL $base_url )
	{
		$this->_total_rows = $toal_rows;
		$this->_page = $page;
		$this->_rows_per_page = $rows_per_page;
		$this->_base_url = $base_url;
	}

	/*
	 * ページ番号を返却
	 */
	public function getPage(){
		return $this->_page;
	}

	/*
	 * 総行数を返却
	 */
	public function getTotalRows(){
		return $this->_total_rows;
	}

	/*
	 * １ページあたりの表示行数を返却
	 */
	public function getRowsPerPage(){
		return $this->_rows_per_page;
	}

	/*
	 * ベースURLを返却
	 */
	public function getBaseURL(){
		return $this->_base_url;
	}


	/*
	 * 文字列化
	 */
	public function __toString(){
		return "[PageInfo: base_url=" .$this->_base_url . " page=" . $this->_page . " total_rows=" . $this->_total_rows . 
				" per_page=" . $this->_rows_per_page . "]";
	}

}


?>
