Exemplo n.º 1
0
 /**
  * Set config object.
  *
  * @param \PicoFeed\Config\Config $config Config instance
  *
  * @return \PicoFeed\Filter\Html
  */
 public function setConfig($config)
 {
     $this->config = $config;
     if ($this->config !== null) {
         $this->attribute->setImageProxyCallback($this->config->getFilterImageProxyCallback());
         $this->attribute->setImageProxyUrl($this->config->getFilterImageProxyUrl());
         $this->attribute->setImageProxyProtocol($this->config->getFilterImageProxyProtocol());
         $this->attribute->setIframeWhitelist($this->config->getFilterIframeWhitelist(array()));
         $this->attribute->setIntegerAttributes($this->config->getFilterIntegerAttributes(array()));
         $this->attribute->setAttributeOverrides($this->config->getFilterAttributeOverrides(array()));
         $this->attribute->setRequiredAttributes($this->config->getFilterRequiredAttributes(array()));
         $this->attribute->setMediaBlacklist($this->config->getFilterMediaBlacklist(array()));
         $this->attribute->setMediaAttributes($this->config->getFilterMediaAttributes(array()));
         $this->attribute->setSchemeWhitelist($this->config->getFilterSchemeWhitelist(array()));
         $this->attribute->setWhitelistedAttributes($this->config->getFilterWhitelistedTags(array()));
         $this->tag->setWhitelistedTags(array_keys($this->config->getFilterWhitelistedTags(array())));
     }
     return $this;
 }