1
0
mirror of https://github.com/php/phd.git synced 2026-03-23 22:52:05 +01:00
This commit is contained in:
Moacir de Oliveira Miranda Júnior
2009-08-06 05:09:44 +00:00
parent 3920471d8d
commit 2c0c2a8bff
2 changed files with 47 additions and 0 deletions

View File

@@ -28,6 +28,9 @@ class PhDIndex extends PhDFormat {
'legalnotice' => 'format_legalnotice_chunk',
'part' => 'format_container_chunk',
'phpdoc:exception' => 'format_container_chunk',
'phpdoc:exceptionref' => 'format_container_chunk',
'phpdoc:classref' => 'format_container_chunk',
'phpdoc:varentry' => 'format_container_chunk',
'preface' => 'format_chunk',
'refentry' => 'format_chunk',
'reference' => 'format_container_chunk',

View File

@@ -178,6 +178,9 @@ class PhDXHTMLFormat extends PhDFormat {
'personname' => 'format_personname',
'personblurb' => 'div',
'phrase' => 'span',
'phpdoc:classref' => 'format_class_chunk',
'phpdoc:exceptionref' => 'format_exception_chunk',
'phpdoc:varentry' => 'format_varentry_chunk',
'preface' => 'format_chunk',
'primaryie' => 'format_suppressed_tags',
'procedure' => 'format_procedure',
@@ -342,6 +345,21 @@ class PhDXHTMLFormat extends PhDFormat {
'classsynopsis' => 'format_classsynopsis_ooclass_classname_text',
),
),
'methodname' => array(
/* DEFAULT */ false,
'constructorsynopsis' => array(
/* DEFAULT */ false,
'classsynopsis' => 'format_classsynopsis_methodsynopsis_methodname_text',
),
'methodsynopsis' => array(
/* DEFAULT */ false,
'classsynopsis' => 'format_classsynopsis_methodsynopsis_methodname_text',
),
'destructorsynopsis' => array(
/* DEFAULT */ false,
'classsynopsis' => 'format_classsynopsis_methodsynopsis_methodname_text',
),
),
'para' => array(
/* DEFAULT */ false,
'footnote' => 'format_footnote_para_text',
@@ -856,7 +874,14 @@ ul.toc li a:hover {
}
public function format_exception_chunk($open, $name, $attrs, $props) {
return $this->format_container_chunk_below($open, "reference", $attrs, $props);
}
public function format_varentry_chunk($open, $name, $attrs, $props) {
return $this->format_container_chunk_below($open, "refentry", $attrs, $props);
}
public function format_class_chunk($open, $name, $attrs, $props) {
return $this->format_container_chunk_below($open, "reference", $attrs, $props);
}
public function format_section_chunk($open, $name, $attrs, $props) {
static $a = array();
if ($open) {
@@ -1075,6 +1100,25 @@ ul.toc li a:hover {
}
return '</b></span>';
}
public function format_classsynopsis_methodsynopsis_methodname_text($value, $tag) {
$value = $this->TEXT($value);
if ($this->cchunk["classsynopsis"]["classname"] === false) {
return $value;
}
if (strpos($value, '::')) {
$explode = '::';
} elseif (strpos($value, '->')) {
$explode = '->';
} else {
return $value;
}
list($class, $method) = explode($explode, $value);
if ($class !== $this->cchunk["classsynopsis"]["classname"]) {
return $value;
}
return $method;
}
public function format_varname($open, $name, $attrs) {
if ($open) {