[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/wact/src/compiler/property/ -> WactPropertyDictionary.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  require_once 'limb/wact/src/compiler/property/WactPropertyInfo.class.php';
  11  require_once 'limb/wact/src/compiler/WactCompilerArtifactDictionary.class.php';
  12  require_once 'limb/wact/src/compiler/property/WactPropertyInfoExtractor.class.php';
  13  
  14  /**

  15   * class WactPropertyDictionary.

  16   *

  17   * @package wact

  18   * @version $Id: WactPropertyDictionary.class.php 5945 2007-06-06 08:31:43Z pachanga $

  19   */
  20  class WactPropertyDictionary extends WactCompilerArtifactDictionary
  21  {
  22    protected $property_information = array();
  23  
  24    function _createArtifactsExtractor($file)
  25    {
  26      return new WactPropertyInfoExtractor($this, $file);
  27    }
  28  
  29    function registerPropertyInfo($PropertyInfo, $file)
  30    {
  31      $name_to_lower = strtolower($PropertyInfo->Property);
  32      $tag_class = $PropertyInfo->TagClass;
  33  
  34      if(isset($this->property_information[$tag_class]) && isset($this->property_information[$tag_class][$name_to_lower]))
  35        return;
  36  
  37      if(!isset($this->property_information[$tag_class]))
  38        $this->property_information[$tag_class] = array();
  39  
  40      $PropertyInfo->File = $file;
  41      $this->property_information[$tag_class][$name_to_lower] = $PropertyInfo;
  42    }
  43  
  44    function getPropertyList($tag)
  45    {
  46      $result = array();
  47  
  48      foreach($this->property_information as $tag_class => $props)
  49      {
  50        if(!is_a($tag, $tag_class))
  51          continue;
  52  
  53        foreach($props as $name => $property)
  54          $result[$name] = $property;
  55      }
  56  
  57      return $result;
  58    }
  59  }
  60  ?>


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