/** * Constructor */ public function __construct($name, $data) { list($namespace, $name) = refnotes_namespace::parseName($name); if (preg_match('/(?:@@FNT|#)(\\d+)/', $name, $match) == 1) { $name = intval($match[1]); } parent::__construct(array('ns' => $namespace, 'name' => $name)); if ($data != '') { $this->parseStructuredData($data); } }
/** * */ public function initializePageNote($data) { if (isset($data['note-name'])) { if (preg_match('/^' . refnotes_note::getNamePattern('full-extended') . '$/', $data['note-name']) == 1) { $this->nameParts = refnotes_namespace::parseName($data['note-name']); } unset($data['note-name']); } $this->data = $data; }