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'] = '';
82 $this->meta = $this->persistent;
95 $this->meta['internal'] = $this->info;
97 if (!isset($this->meta['description']['abstract'])) {
99 $this->doc = trim($this->doc);
100 if (strlen($this->doc) > self::ABSTRACT_MAX) {
101 $this->doc = PhpString::substr($this->doc, 0, self::ABSTRACT_MAX) . '…';
103 $this->meta['description']['abstract'] = $this->doc;
106 $this->meta['relation']['firstimage'] = $this->firstimage;
108 if (!isset($this->meta['date']['modified'])) {
109 $this->meta['date']['modified'] = filemtime(wikiFN($ID));
112 $this->doc = '';
125 if (!$this->capture || !$this->capturing) {
129 $this->doc .= $text;
131 $this->captured += strlen($text);
132 if ($this->captured > self::ABSTRACT_LEN) {
133 $this->capture = false;
150 // the TOC is one of our standard ul list arrays ;-)
151 $this->meta['description']['tableofcontents'][] = [
155 'level' => $level - $conf['toptoclevel'] + 1
169 if (!isset($this->meta['title'])) {
170 $this->meta['title'] = $text;
174 $hid = $this->_headerToLink($text, true);
175 $this->toc_additem($hid, $text, $level);
178 $this->cdata(DOKU_LF . $text . DOKU_LF);
186 $this->cdata(DOKU_LF);
194 $this->cdata(DOKU_LF);
202 $this->cdata(DOKU_LF);
210 $this->cdata(DOKU_LF . '----------' . DOKU_LF);
224 if ($this->capture) {
227 $this->store = $this->doc;
228 $this->doc = '';
231 $this->capturing = false;
239 * the previously rendered content is restored and capturing is re-enabled.
245 if ($this->capture) {
246 // re-enable capturing
247 $this->capturing = true;
249 $this->doc = $this->store;
250 $this->store = '';
259 $this->cdata(DOKU_LF);
267 $this->cdata(DOKU_LF);
278 $this->cdata(str_repeat(DOKU_TAB, $level) . '* ');
286 $this->cdata(DOKU_LF);
296 $this->cdata($text);
304 $this->cdata(DOKU_LF . DOKU_TAB . '"');
312 $this->cdata('"' . DOKU_LF);
324 $this->cdata(DOKU_LF . $text . DOKU_LF);
336 $this->cdata(DOKU_LF . $text . DOKU_LF);
342 * Uses $this->acronyms
348 $this->cdata($acronym);
354 * Uses $this->smiley
360 $this->cdata($smiley);
368 * Uses $this->entities
374 $this->cdata($entity);
387 $this->cdata($x . '×' . $y);
396 $this->cdata($lang['singlequoteopening']);
405 $this->cdata($lang['singlequoteclosing']);
414 $this->cdata($lang['apostrophe']);
423 $this->cdata($lang['doublequoteopening']);
432 $this->cdata($lang['doublequoteclosing']);
438 * @param string $link The link name
443 $this->internallink($link, $link);
450 * @param string $name name for the link
452 public function locallink($hash, $name = null) argument
454 if (is_array($name)) {
455 $this->_firstimage($name['src']);
456 if ($name['type'] == 'internalmedia') {
457 $this->_recordMediaUsage($name['src']);
463 * keep track of internal links in $this->meta['relation']['references']
466 * @param string|array|null $name name for the link, array for media file
468 public function internallink($id, $name = null) argument
472 if (is_array($name)) {
473 $this->_firstimage($name['src']);
474 if ($name['type'] == 'internalmedia') {
475 $this->_recordMediaUsage($name['src']);
484 $default = $this->_simpleTitle($id);
488 $id = $resolver->resolveId($id);
492 $this->meta['relation']['references'][$page] = page_exists($page);
497 if ($this->capture) {
498 $name = $this->_getLinkTitle($name, $default, $id);
499 $this->doc .= $name;
507 * @param string|array|null $name name for the link, array for media file
509 public function externallink($url, $name = null) argument
511 if (is_array($name)) {
512 $this->_firstimage($name['src']);
513 if ($name['type'] == 'internalmedia') {
514 $this->_recordMediaUsage($name['src']);
518 if ($this->capture) {
519 $this->doc .= $this->_getLinkTitle($name, '<' . $url . '>');
526 * You may want to use $this->_resolveInterWiki() here
528 * @param string $match original link - probably not much use
529 * @param string|array $name name for the link, array for media file
533 public function interwikilink($match, $name, $wikiName, $wikiUri) argument
535 if (is_array($name)) {
536 $this->_firstimage($name['src']);
537 if ($name['type'] == 'internalmedia') {
538 $this->_recordMediaUsage($name['src']);
542 if ($this->capture) {
544 $name = $this->_getLinkTitle($name, $wikiUri);
545 $this->doc .= $name;
553 * @param string|array $name name for the link, array for media file
555 public function windowssharelink($url, $name = null) argument
557 if (is_array($name)) {
558 $this->_firstimage($name['src']);
559 if ($name['type'] == 'internalmedia') {
560 $this->_recordMediaUsage($name['src']);
564 if ($this->capture) {
565 if ($name) {
566 $this->doc .= $name;
568 $this->doc .= '<' . $url . '>';
574 * Render a linked E-Mail Address
578 * @param string $address Email-Address
579 * @param string|array $name name for the link, array for media file
581 public function emaillink($address, $name = null) argument
583 if (is_array($name)) {
584 $this->_firstimage($name['src']);
585 if ($name['type'] == 'internalmedia') {
586 $this->_recordMediaUsage($name['src']);
590 if ($this->capture) {
591 if ($name) {
592 $this->doc .= $name;
594 $this->doc .= '<' . $address . '>';
619 if ($this->capture && $title) {
620 $this->doc .= '[' . $title . ']';
622 $this->_firstimage($src);
623 $this->_recordMediaUsage($src);
646 if ($this->capture && $title) {
647 $this->doc .= '[' . $title . ']';
649 $this->_firstimage($src);
660 $this->meta['relation']['haspart'][$url] = true;
662 $this->meta['date']['valid']['age'] =
663 isset($this->meta['date']['valid']['age']) ?
664 min($this->meta['date']['valid']['age'], $params['refresh']) :
671 * Removes any Namespace from the given name but keeps
674 * @param string $name
680 public function _simpleTitle($name) argument
684 if (is_array($name)) {
693 $name = preg_replace('!.*' . $nssep . '!', '', $name);
694 //if there is a hash we use the anchor name only
695 $name = preg_replace('!.*#!', '', $name);
696 return $name;
738 if ($this->firstimage) {
744 $src = (new MediaResolver($ID))->resolveId($src);
747 $this->firstimage = $src;
764 $src = (new MediaResolver($ID))->resolveId($src);
766 $this->meta['relation']['media'][$src] = file_exists($file);