function __construct($tag, $optTag, $level) { parent::__construct($tag); $this->level = $level; $opt = new NyaaWikiList($optTag); $this->last = $this->last->insert($opt); }
function getHeadTag() { if ($this->getAttr('breakline')) { $this->tag = 'pre'; } $ret = $this->hasAttr('title') ? $this->getAttr('title') . ":<br />" : ""; $ret .= parent::getHeadTag(); return $ret; }
function insert($tk) { if (count($this->children) == 0 && is_a($tk, 'NyaaParserTokenInline') && is_string($tk->children[0])) { if ('~' === $tk->children[0][0]) { $tk->children[0] = substr($tk->children[0], 1); $this->addClass('wiki-paragraph-indent'); } } return parent::insert($tk); }
function __construct($parser, $line) { parent::__construct('pre'); $this->parser = $parser; $this->text = $line; $this->addClass('wiki-box'); if (preg_match('/' . self::REGEX . '/x', $line, $m)) { if (empty($m[2])) { $this->capStart(array($this, 'input')); } } }
function __construct($tag, $level) { parent::__construct($tag); $this->level = $level; }
function __construct($level) { $this->level = $level; parent::__construct('div'); }
/** * extend getTagAttrs method * @return text */ function getTagAttrs() { $text = parent::getTagAttrs(); $text .= sprintf(' href="%s"', $this->getAttr('href')); return $text; }
/** * construct */ function __construct($level) { parent::__construct('div'); $this->addClass("wiki-section wiki-section-{$level}"); $this->level = $level; }