PicoFeed\Filter\Tag::isAllowedTag PHP Метод

isAllowedTag() публичный Метод

Check if a tag is on the whitelist.
public isAllowedTag ( string $tag ) : boolean
$tag string Tag name
Результат boolean
    public function isAllowedTag($tag)
    {
        return in_array($tag, array_merge($this->tag_whitelist, array_keys($this->config->getFilterWhitelistedTags(array()))));
    }

Usage Example

Пример #1
0
 /**
  * Parse closing tag.
  *
  * @param resource $parser XML parser
  * @param string   $tag    Tag name
  */
 public function endTag($parser, $tag)
 {
     if (!array_pop($this->empty_tags) && $this->tag->isAllowedTag($tag)) {
         $this->output .= $this->tag->closeHtmlTag($tag);
     }
 }