cvs: phd /formats xhtml.php
| From: | Hannes Magnusson | Date: | Tue, 04 Dec 2007 11:27:17 +0000 |
| Subject: | cvs: phd /formats xhtml.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-525@lists.php.net to get a copy of this message | ||
bjori Tue Dec 4 11:27:17 2007 UTC
Modified files:
/phd/formats xhtml.php
Log:
- Fix E_NOTICE (Richard Q.)
- Minor WS fix
http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.43&r2=1.44&diff_format=u
Index: phd/formats/xhtml.php
diff -u phd/formats/xhtml.php:1.43 phd/formats/xhtml.php:1.44
--- phd/formats/xhtml.php:1.43 Mon Nov 26 14:15:31 2007
+++ phd/formats/xhtml.php Tue Dec 4 11:27:17 2007
@@ -1,5 +1,5 @@
<?php
-/* $Id: xhtml.php,v 1.43 2007/11/26 14:15:31 bjori Exp $ */
+/* $Id: xhtml.php,v 1.44 2007/12/04 11:27:17 bjori Exp $ */
class XHTMLPhDFormat extends PhDFormat {
protected $elementmap = array( /* {{{ */
@@ -418,9 +418,21 @@
}
public function format_classsynopsis_methodsynopsis_methodname_text($value, $tag) {
- if (!isset($this->tmp["classsynopsis"]["classname"])) return $value;
- list($class, $method) = explode('::', $value);
- if ($class !== $this->tmp["classsynopsis"]["classname"]) return
$value;
+ if (!isset($this->tmp["classsynopsis"]["classname"])) {
+ return $value;
+ }
+ if (strpos($value, '::')) {
+ $explode = '::';
+ } else if (strpos($value, '->')) {
+ $explode = '->';
+ } else {
+ return $value;
+ }
+
+ list($class, $method) = explode($explode, $value);
+ if ($class !== $this->tmp["classsynopsis"]["classname"]) {
+ return $value;
+ }
return $method;
}