Ejemplo n.º 1
0
 function __construct($obj)
 {
     parent::__construct($obj);
     // convert the list of recognized schemes to a regex-safe string,
     // where the pattern delim is a slash
     $tmp = array();
     $list = $this->getConf('schemes', array());
     foreach ($list as $val) {
         $tmp[] = preg_quote($val, '/');
     }
     $schemes = implode('|', $tmp);
     // build the regex
     $urlRegex = "(?:(?:{$schemes})" . "(?:" . "[^ \\/\"\\'{$this->wiki->delim}]*\\/" . ")*" . "[^ \\t\\n\\/\"{$this->wiki->delim}]*?)";
     $this->regex = ';\\[\\[iframe\\s+(' . $urlRegex . ')(\\s+.*?)?\\]\\];si';
 }