[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/wact/src/tags/request/ -> site_branch.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 site_branch
  11   * @parent_tag_class WactSiteBranchSelectorTag
  12   * @package wact
  13   * @version $Id$
  14   */
  15  class WactSiteBranchTag extends WactSilentCompilerTag
  16  {
  17    protected $path;
  18    protected $is_default = false;
  19  
  20    function preParse()
  21    {
  22      parent :: preParse();
  23  
  24      if($default = $this->getAttribute('default'))
  25        $this->is_default = true;
  26  
  27      $this->path = $this->getAttribute('path');
  28      if(!$this->is_default && !$this->path)
  29      {
  30        $this->raiseRequiredAttributeError('path or default');
  31      }
  32    }
  33  
  34    function isDefault()
  35    {
  36      return $this->is_default;
  37    }
  38  
  39    function getPath()
  40    {
  41      return $this->path;
  42    }
  43  }
  44  
  45  ?>


Generated: Thu Jan 8 04:06:23 2009 Cross-referenced by PHPXref 0.7