function PukiWikiDiv(&$root, $text) { parent::PukiWikiElement(); if (!preg_match("/^\\#([^\\(]+)(?:\\((.*)\\))?/", $text, $out) or !PukiWikiPlugin::exist_plugin_convert($out[1])) { $this = new PukiWikiParagraph($text); $this->last =& $this; return; } list(, $this->name, $this->param) = array_pad($out, 3, ''); }
function &Factory_PukiWikiDiv(&$root, $text) { if (!preg_match("/^\\#([^\\(]+)(?:\\((.*)\\))?/", $text, $out) || !PukiWikiPlugin::exist_plugin_convert($out[1])) { return new PukiWikiParagraph($text); } else { return new PukiWikiDiv($out); } }