| [ Index ] |
PHP Cross Reference of Web Application Component Toolkit |
[Summary view] [Print] [Text view]
1 <?php 2 //-------------------------------------------------------------------------------- 3 // Copyright 2003 Procata, Inc. 4 // Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html) 5 //-------------------------------------------------------------------------------- 6 /** 7 * @package WACT_TAG 8 * @version $Id: rownumber.prop.php,v 1.2 2004/11/18 04:22:49 jeffmoore Exp $ 9 */ 10 11 PropertyDictionary::registerProperty( 12 new PropertyInfo('ListRowNumber', 'list:LIST', 'ListRowNumberProperty'), __FILE__); 13 14 class ListRowNumberProperty extends CompilerProperty { 15 16 var $tempvar; 17 var $hasIncrement = FALSE; 18 19 function generateScopeEntry(&$code) { 20 $this->tempvar = $code->getTempVariable(); 21 $code->writePHP('$' . $this->tempvar . ' = 0;'); 22 } 23 24 /** 25 * Generate the code to read the data value at run time 26 * Must generate only a valid PHP Expression. 27 * @param CodeWriter 28 * @return void 29 * @access protected 30 */ 31 function generateExpression(&$code) { 32 if (!$this->hasIncrement) { 33 $code->writePHP('++'); 34 $this->hasIncrement = TRUE; 35 } 36 $code->writePHP('$' . $this->tempvar); 37 } 38 39 } 40 41 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Sun Nov 28 19:36:09 2004 | Cross-referenced by PHPXref 0.5 |