[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/wact/src/tags/iterator/ -> iterator_decorate.tag.php (source)

   1  <?php
   2  /*
   3   * Limb PHP Framework
   4   *
   5   * @link http://limb-project.com 
   6   * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
   7   * @license    LGPL http://www.gnu.org/copyleft/lesser.html 
   8   */
   9  /**
  10   * @tag iterator:DECORATE
  11   * @forbid_end_tag
  12   * @req_const_attributes using
  13   * @parent_tag_class WactIteratorTransferTag
  14   * @package wact
  15   * @version $Id$
  16   */
  17  class WactIteratorDecorateTag extends WactCompilerTag
  18  {
  19    function generateTagContent($code)
  20    {
  21      $include_path = $this->getAttribute('include');
  22  
  23      $decorator = $this->getAttribute('using');
  24      $code->writePhp($this->parent->getComponentRefCode() .
  25                        '->addDataSetDecorator("' . $decorator . '", "' . $include_path . '");');
  26  
  27      foreach(array_keys($this->attributeNodes) as $key)
  28      {
  29        $name = $this->attributeNodes[$key]->getName();
  30  
  31        if($name == 'using')
  32          continue;
  33  
  34        $code->writePhp($this->parent->getComponentRefCode() .
  35                        '->addDataSetDecoratorParameter("' . $decorator . '","' . $name . '",');
  36        $this->attributeNodes[$key]->generateExpression($code);
  37        $code->writePhp(');');
  38      }
  39    }
  40  }
  41  
  42  ?>


Generated: Tue Oct 7 05:02:03 2008 Cross-referenced by PHPXref 0.7