コード例 #1
0
ファイル: list.class.php プロジェクト: kurari/Nyaa-System
 function __construct($tag, $optTag, $level)
 {
     parent::__construct($tag);
     $this->level = $level;
     $opt = new NyaaWikiList($optTag);
     $this->last = $this->last->insert($opt);
 }
コード例 #2
0
ファイル: quote.class.php プロジェクト: kurari/Nyaa-System
 function getHeadTag()
 {
     if ($this->getAttr('breakline')) {
         $this->tag = 'pre';
     }
     $ret = $this->hasAttr('title') ? $this->getAttr('title') . ":<br />" : "";
     $ret .= parent::getHeadTag();
     return $ret;
 }
コード例 #3
0
 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);
 }
コード例 #4
0
ファイル: block.class.php プロジェクト: kurari/Nyaa-System
 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'));
         }
     }
 }
コード例 #5
0
ファイル: list.class.php プロジェクト: kurari/Nyaa-System
 function __construct($tag, $level)
 {
     parent::__construct($tag);
     $this->level = $level;
 }
コード例 #6
0
 function __construct($level)
 {
     $this->level = $level;
     parent::__construct('div');
 }
コード例 #7
0
ファイル: link.class.php プロジェクト: kurari/Nyaa-System
 /**
  * extend getTagAttrs method
  * @return text
  */
 function getTagAttrs()
 {
     $text = parent::getTagAttrs();
     $text .= sprintf(' href="%s"', $this->getAttr('href'));
     return $text;
 }
コード例 #8
0
ファイル: heading.class.php プロジェクト: kurari/Nyaa-System
 /**
  * construct
  */
 function __construct($level)
 {
     parent::__construct('div');
     $this->addClass("wiki-section wiki-section-{$level}");
     $this->level = $level;
 }