[ Index ]

PHP Cross Reference of Web Application Component Toolkit

title

Body

[close]

/framework/template/tags/page/ -> totalpages.prop.php (source)

   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: totalpages.prop.php,v 1.2 2004/11/18 04:22:50 jeffmoore Exp $
   9  */
  10  
  11  PropertyDictionary::registerProperty(
  12      new PropertyInfo('TotalPages', 'page:navigator', 'TotalPagesProperty'), __FILE__);
  13  
  14  class TotalPagesProperty extends CompilerProperty {
  15  
  16      var $context;
  17      
  18      function TotalPagesProperty(&$context) {
  19          $this->context =& $context;
  20      }
  21  
  22      /**
  23      * Generate the code to read the data value at run time
  24      * Must generate only a valid PHP Expression.
  25      * @param CodeWriter
  26      * @return void
  27      * @access protected
  28      */
  29  	function generateExpression(&$code) {
  30          $code->writePHP($this->context->getComponentRefCode());        
  31          $code->writePHP('->getLastPageNumber()');
  32      }
  33  
  34  }
  35  
  36  ?>


Generated: Sun Nov 28 19:36:09 2004 Cross-referenced by PHPXref 0.5