Lines Matching +full:- +full:- +full:name

14  * Some simplified rendering to $doc is done to gather the page's (text-only) abstract.
69 $this->headers = [];
72 if (!isset($this->persistent['date']['created']) || !$this->persistent['date']['created']) {
73 $this->persistent['date']['created'] = filectime(wikiFN($ID));
75 if (!isset($this->persistent['user'])) {
76 $this->persistent['user'] = '';
78 if (!isset($this->persistent['creator'])) {
79 $this->persistent['creator'] = '';
87 if (isset($this->persistent['description']['tableofcontents'])) {
88 unset($this->persistent['description']['tableofcontents']);
92 $this->meta = $this->persistent;
105 $this->meta['internal'] = $this->info;
107 if (!isset($this->meta['description']['abstract'])) {
109 $this->doc = trim($this->doc);
110 if (strlen($this->doc) > self::ABSTRACT_MAX) {
111 $this->doc = PhpString::substr($this->doc, 0, self::ABSTRACT_MAX) . '…';
113 $this->meta['description']['abstract'] = $this->doc;
116 $this->meta['relation']['firstimage'] = $this->firstimage;
118 if (!isset($this->meta['date']['modified'])) {
119 $this->meta['date']['modified'] = filemtime(wikiFN($ID));
122 $this->doc = '';
135 if (!$this->capture || !$this->capturing) {
139 $this->doc .= $text;
141 $this->captured += strlen($text);
142 if ($this->captured > self::ABSTRACT_LEN) {
143 $this->capture = false;
160 // the TOC is one of our standard ul list arrays ;-)
161 $this->meta['description']['tableofcontents'][] = [
165 'level' => $level - $conf['toptoclevel'] + 1
179 if (!isset($this->meta['title'])) {
180 $this->meta['title'] = $text;
184 $hid = $this->_headerToLink($text, true);
185 $this->toc_additem($hid, $text, $level);
188 $this->cdata(DOKU_LF . $text . DOKU_LF);
196 $this->cdata(DOKU_LF);
204 $this->cdata(DOKU_LF);
212 $this->cdata(DOKU_LF);
220 $this->cdata(DOKU_LF . '----------' . DOKU_LF);
234 if ($this->capture) {
237 $this->store = $this->doc;
238 $this->doc = '';
241 $this->capturing = false;
249 * the previously rendered content is restored and capturing is re-enabled.
255 if ($this->capture) {
256 // re-enable capturing
257 $this->capturing = true;
259 $this->doc = $this->store;
260 $this->store = '';
269 $this->cdata(DOKU_LF);
277 $this->cdata(DOKU_LF);
288 $this->cdata(str_repeat(DOKU_TAB, $level) . '* ');
296 $this->cdata(DOKU_LF);
306 $this->cdata($text);
314 $this->cdata(DOKU_LF . DOKU_TAB . '"');
322 $this->cdata('"' . DOKU_LF);
334 $this->cdata(DOKU_LF . $text . DOKU_LF);
346 $this->cdata(DOKU_LF . $text . DOKU_LF);
352 * Uses $this->acronyms
358 $this->cdata($acronym);
364 * Uses $this->smiley
370 $this->cdata($smiley);
378 * Uses $this->entities
384 $this->cdata($entity);
397 $this->cdata($x . '×' . $y);
406 $this->cdata($lang['singlequoteopening']);
415 $this->cdata($lang['singlequoteclosing']);
424 $this->cdata($lang['apostrophe']);
433 $this->cdata($lang['doublequoteopening']);
442 $this->cdata($lang['doublequoteclosing']);
448 * @param string $link The link name
453 $this->internallink($link, $link);
460 * @param string $name name for the link
462 public function locallink($hash, $name = null) argument
464 if (is_array($name)) {
465 $this->_firstimage($name['src']);
466 if ($name['type'] == 'internalmedia') {
467 $this->_recordMediaUsage($name['src']);
473 * keep track of internal links in $this->meta['relation']['references']
476 * @param string|array|null $name name for the link, array for media file
478 public function internallink($id, $name = null) argument
482 if (is_array($name)) {
483 $this->_firstimage($name['src']);
484 if ($name['type'] == 'internalmedia') {
485 $this->_recordMediaUsage($name['src']);
494 $default = $this->_simpleTitle($id);
498 $id = $resolver->resolveId($id);
502 $this->meta['relation']['references'][$page] = page_exists($page);
507 if ($this->capture) {
508 $name = $this->_getLinkTitle($name, $default, $id);
509 $this->doc .= $name;
517 * @param string|array|null $name name for the link, array for media file
519 public function externallink($url, $name = null) argument
521 if (is_array($name)) {
522 $this->_firstimage($name['src']);
523 if ($name['type'] == 'internalmedia') {
524 $this->_recordMediaUsage($name['src']);
528 if ($this->capture) {
529 $this->doc .= $this->_getLinkTitle($name, '<' . $url . '>');
536 * You may want to use $this->_resolveInterWiki() here
538 * @param string $match original link - probably not much use
539 * @param string|array $name name for the link, array for media file
543 public function interwikilink($match, $name, $wikiName, $wikiUri) argument
545 if (is_array($name)) {
546 $this->_firstimage($name['src']);
547 if ($name['type'] == 'internalmedia') {
548 $this->_recordMediaUsage($name['src']);
552 if ($this->capture) {
554 $name = $this->_getLinkTitle($name, $wikiUri);
555 $this->doc .= $name;
563 * @param string|array $name name for the link, array for media file
565 public function windowssharelink($url, $name = null) argument
567 if (is_array($name)) {
568 $this->_firstimage($name['src']);
569 if ($name['type'] == 'internalmedia') {
570 $this->_recordMediaUsage($name['src']);
574 if ($this->capture) {
575 if ($name) {
576 $this->doc .= $name;
578 $this->doc .= '<' . $url . '>';
584 * Render a linked E-Mail Address
588 * @param string $address Email-Address
589 * @param string|array $name name for the link, array for media file
591 public function emaillink($address, $name = null) argument
593 if (is_array($name)) {
594 $this->_firstimage($name['src']);
595 if ($name['type'] == 'internalmedia') {
596 $this->_recordMediaUsage($name['src']);
600 if ($this->capture) {
601 if ($name) {
602 $this->doc .= $name;
604 $this->doc .= '<' . $address . '>';
629 if ($this->capture && $title) {
630 $this->doc .= '[' . $title . ']';
632 $this->_firstimage($src);
633 $this->_recordMediaUsage($src);
656 if ($this->capture && $title) {
657 $this->doc .= '[' . $title . ']';
659 $this->_firstimage($src);
670 $this->meta['relation']['haspart'][$url] = true;
672 $this->meta['date']['valid']['age'] =
673 isset($this->meta['date']['valid']['age']) ?
674 min($this->meta['date']['valid']['age'], $params['refresh']) :
681 * Removes any Namespace from the given name but keeps
684 * @param string $name
690 public function _simpleTitle($name) argument
694 if (is_array($name)) {
703 $name = preg_replace('!.*' . $nssep . '!', '', $name);
704 //if there is a hash we use the anchor name only
705 $name = preg_replace('!.*#!', '', $name);
706 return $name;
748 if ($this->firstimage) {
754 $src = (new MediaResolver($ID))->resolveId($src);
757 $this->firstimage = $src;
774 $src = (new MediaResolver($ID))->resolveId($src);
776 $this->meta['relation']['media'][$src] = file_exists($file);