Пример #1
0
 public function __construct()
 {
     parent::__construct();
     $this->tagrules = array('link' => $this->tagrules['link'], 'url' => $this->tagrules['url']);
     // Headers are considered tags here.
     $this->tagrules['header'] = array('expression' => "/<\\s*h([1-{$this->maxheaderdepth}])\\s*>(.+?)<\\/h[1-{$this->maxheaderdepth}]>/is");
 }
Пример #2
0
    public function __construct() {
        parent::__construct();
        $this->tagrules = array('link' => $this->tagrules['link'], 'url' => $this->tagrules['url']);

        //headers are considered tags here...
        $h1 = array("<\s*h1\s*>", "<\/h1>");
        $this->tagrules['header1'] = array('expression' => "/{$h1[0]}(.+?){$h1[1]}/is"
        );
    }
Пример #3
0
 public function __construct()
 {
     parent::__construct();
     // The order is important, headers should be parsed before links.
     $this->tagrules = array('header' => array('expression' => "/<\\s*h([1-{$this->maxheaderdepth}])\\s*>(.+?)<\\/h[1-{$this->maxheaderdepth}]>/is"), 'link' => $this->tagrules['link'], 'url' => $this->tagrules['url']);
 }