Source for file OCSP_FRMCONTR_PEAR_DATAGRID.phpclass
Documentation is available at OCSP_FRMCONTR_PEAR_DATAGRID.phpclass
* openCSP class file OCSP_FRMCONTR_PEAR_DATAGRID.phpclass
* @project Open CSP-Management
* @author Peter Krebs <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: OCSP_FRMCONTR_PEAR_DATAGRID.phpclass,v 1.2 2008/11/28 13:20:39 pitlinz Exp $
// ---------------------------------------------------------
// ---------------------------------------------------------
@require_once("Structures" .
_OCSP_DIRSEP_ .
"DataGrid.php");
throw
new Exception("MISSING PEAR:" .
Structures_DataGrid_DataSource);
if (!defined('PEAR_DATAGRID_MAXLIMIT'))
define('PEAR_DATAGRID_MAXLIMIT',18446744073709551615);
* openCSP class OCSP_FRMCONTR_PEAR_DATAGRID
* @project Open CSP-Management
* @author Peter Krebs <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: OCSP_FRMCONTR_PEAR_DATAGRID.phpclass,v 1.2 2008/11/28 13:20:39 pitlinz Exp $
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*** class vars ------------------------------------------------------ */
/*** class methods --------------------------------------------------- */
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*** compostion --------------------------------------------------- */
* @var Structures_DataGrid $myPearDataGrid
* @var PEAR_DATAGRID_DATASOURCE_OCSP_FRMCONTR_LIST $myPearDataSource
/*** attributes -------------------------------------------------- */
* special sort prepended to the default list sort
* @var string $myDataGridSort
* @var int $myPearDataOffset
* @var int $myPearDataLimit
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
* returns the grid data source object
* @return PEAR_DATAGRID_DATASOURCE_OCSP_FRMCONTR_LIST
* returns the data grid with the source binded
* returns the order by string
* appends $this->myDataGridSort
* sets the data grid sort
* note: forces a reload of the list values
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
* returns the number of total rows
public function getListRows($offset=
0,$limit=
PEAR_DATAGRID_MAXLIMIT,$debug=
False)
$arr_fields =
$this->getMyForm()->getFields();
// set the global data array
$str_globalArrName=
"LISTROW_".
$this->myForm->getId();
global $
{$str_globalArrName};
int_size: {
$int_size} / {
$limit}
while(($this->myListIdx <
$int_size) &&
(($int_idx <
$limit) ||
(intval($limit) ==
0)))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<p>current row</p><pre>" .
print_r($this->curRow,True)) .
"</pre>";
if ($obj_tblObj=
$this->myForm->getMyTblObj(True,$debug))
$obj_tblObj->setDBVal($this->curRow,$debug);
$obj_tblObj->setDBRow($this->curRow,True,$debug);
if (!$b_canShow) continue;
if ($obj_tblObj->isPopulated())
$this->curRow=
array_merge($this->curRow,$obj_tblObj->getDBVal());
$this->curRow=
array_merge($this->curRow,$obj_tblObj->getDBRow(False,$debug));
${$str_globalArrName} = $this->curRow;
$arr_ret[$int_idx] =
array();
foreach($arr_fields as &$obj_field)
if ($obj_field->exportCSV() &&
$obj_field->isToShow(FRM_MODE_LIST,$str_globalArrName))
$mix_listValue=(isset($this->curRow[$obj_field->getName()]) ?
$this->curRow[$obj_field->getName()] :
Null);
$arr_ret[$int_idx][$obj_field->getName()] =
$obj_field->getCSV_Value($mix_listValue,$str_globalArrName,$debug);
if (strstr($this->encoding,'ISO-8859-1') !==
False)
if (OCSP_OBJ::isMultiByteStr($arr_ret[$int_idx][$obj_field->getName()]))
$arr_ret[$int_idx][$obj_field->getName()] =
utf8_decode($arr_ret[$int_idx][$obj_field->getName()]);
} else if (strstr($this->encoding,'UTF8')) {
if (!OCSP_OBJ::isUTF8($arr_ret[$int_idx][$obj_field->getName()]))
$arr_ret[$int_idx][$obj_field->getName()] =
utf8_encode($arr_ret[$int_idx][$obj_field->getName()]);
} // while(($this->myListIdx < $int_size) && (($int_idx ....)))
Documentation generated on Thu, 08 Jan 2009 17:46:33 +0100 by phpDocumentor 1.4.0a2