[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/macro/src/ -> lmbMacroTagInfo.class.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  /**

  11   * class lmbMacroTagInfo.

  12   *

  13   * @package macro

  14   * @version $Id$

  15   */
  16  class lmbMacroTagInfo
  17  {
  18    protected $tag = '';
  19    protected $class = '';
  20    protected $file;
  21    protected $req_attributes = array();
  22    protected $parent_class;
  23    protected $restrict_self_nesting = false;
  24    protected $forbid_parsing = false;
  25    protected $forbid_endtag = false;
  26  
  27    function __construct($tag, $class)
  28    {
  29      $this->tag = $tag;
  30      $this->class = $class;
  31    }
  32    
  33    function getTag()
  34    {
  35      return $this->tag;
  36    }
  37    
  38    function setFile($file)
  39    {
  40      $this->file = $file;
  41    }
  42  
  43    function setForbidEndtag($flag = true)
  44    {
  45      $this->forbid_endtag = $flag;
  46    }
  47  
  48    function isEndtagForbidden()
  49    {
  50      return $this->forbid_endtag;
  51    }
  52  
  53    function setRequiredAttributes($attributes)
  54    {
  55      $this->req_attributes = $attributes;
  56    }
  57  
  58    function getRequiredAttributes()
  59    {
  60      return $this->req_attributes;
  61    }
  62  
  63    function setParentClass($parent_tag_class)
  64    {
  65      $this->parent_class = $parent_tag_class;
  66    }
  67  
  68    function getParentClass()
  69    {
  70      return $this->parent_class;
  71    }
  72  
  73    function setRestrictSelfNesting($flag = true)
  74    {
  75      $this->restrict_self_nesting = $flag;
  76    }
  77  
  78    function isRestrictSelfNesting()
  79    {
  80      return $this->restrict_self_nesting;
  81    }
  82  
  83    function setForbidParsing($flag = true)
  84    {
  85      $this->forbid_parsing = $flag;
  86    }
  87  
  88    function isParsingForbidden()
  89    {
  90      return $this->forbid_parsing;
  91    }
  92  
  93    function load()
  94    {
  95      if(!class_exists($this->class) && isset($this->file))
  96        require_once($this->file);
  97    }
  98  }
  99  ?>


Generated: Mon Sep 8 04:35:41 2008 Cross-referenced by PHPXref 0.7