Exemplo n.º 1
0
 /**
  * checks if the current parent tag is $tag.  Will match the class is $tag has a class associated
  * in tag.class format, or will match any tag if there is no class included
  * @param string $tag
  * @return boolean
  */
 public function isParentTag($tag)
 {
     $tag = IdmlPxeHelper::stripHash($tag);
     $parentTag = IdmlPxeHelper::stripHash($this->getParentTag());
     if (!strpos($tag, ".")) {
         $parentTag = IdmlPxeHelper::stripClass($parentTag);
     }
     return $parentTag == $tag;
 }
Exemplo n.º 2
0
 /**
  * Returns the tag's rule set or false if the tag is not found
  * @param string $tag
  * @return array or false
  */
 public function getPxeTagRule($tag)
 {
     if (is_array($this->rules)) {
         $tag = IdmlPxeHelper::stripHash($tag);
         if (array_key_exists($tag, $this->rules)) {
             return $this->rules[$tag];
         } elseif (strpos($tag, '.')) {
             $tag = IdmlPxeHelper::stripClass($tag);
             return $this->getPxeTagRule($tag);
         }
     }
     return false;
 }