[PHP-DOC] #42216 [NEW]: oop5 basics- extends. Sentence incorrect

2007-08-05 Thread elroy_chops at hotmail dot com
From: elroy_chops at hotmail dot com
Operating system: 
PHP version:  Irrelevant
PHP Bug Type: Documentation problem
Bug description:  oop5 basics- extends. Sentence incorrect

Description:

PHP Manual > Classes and Objects (PHP 5) > The Basics > Extends

Tiny change required to the below sentence from this page
http://au3.php.net/manual/en/language.oop5.basic.php

"The inherited methods and members can be overridden, unless the parent
class has defined a method as final, by redeclaring them within the same
name defined in the parent class."

The word 'within' should be replaced by the word 'with'. See below.

"The inherited methods and members can be overridden, unless the parent
class has defined a method as final, by redeclaring them with the same name
defined in the parent class."


-- 
Edit bug report at http://bugs.php.net/?id=42216&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42216&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42216&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42216&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42216&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=42216&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=42216&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=42216&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=42216&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=42216&r=support
Expected behavior:http://bugs.php.net/fix.php?id=42216&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=42216&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=42216&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42216&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42216&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42216&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=42216&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=42216&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42216&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=42216&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=42216&r=mysqlcfg


[PHP-DOC] cvs: phd /tests/xhtml 003.phpt /tests/xhtml/data 003.xml

2007-08-05 Thread Hannes Magnusson
bjori   Sun Aug  5 22:57:14 2007 UTC

  Added files: 
/phd/tests/xhtml003.phpt 
/phd/tests/xhtml/data   003.xml 
  Log:
  New test
  
  
http://cvs.php.net/viewvc.cgi/phd/tests/xhtml/003.phpt?view=markup&rev=1.1
Index: phd/tests/xhtml/003.phpt
+++ phd/tests/xhtml/003.phpt
--TEST--
CALS Table rendering#003
--FILE--
getMap();

while($reader->read()) {
$type = $reader->nodeType;
$name = $reader->name;

switch($type) {
case XMLReader::ELEMENT:
case XMLReader::END_ELEMENT:
$open = $type == XMLReader::ELEMENT;

$funcname = "format_$name";
if (isset($map[$name])) {
$tag = $map[$name];
if (is_array($tag)) {
$tag = $reader->notXPath($tag);
}
if (strncmp($tag, "format_", 7)) {
$retval = $format->transformFromMap($open, $tag, $name);
break;
}
$funcname = $tag;
}

$retval = $format->{$funcname}($open, $name);
break;

case XMLReader::TEXT:
$retval = htmlspecialchars($reader->value, ENT_QUOTES);
break;

case XMLReader::CDATA:
$retval = $format->CDATA($reader->value);
break;

case XMLReader::COMMENT:
case XMLReader::WHITESPACE:
case XMLReader::SIGNIFICANT_WHITESPACE:
case XMLReader::DOC_TYPE:
/* swallow it */
continue 2;

default:
trigger_error("Don't know how to handle {$name} {$type}", E_USER_ERROR);
return;
}
echo $retval, "\n";
}

$reader->close();
?>
--EXPECT--



nl_langinfo Constants








Constant


Description









LC_TIME Category Constants






ABDAY_(1-7)


Abbreviated name of n-th day of the week.





DAY_(1-7)


Name of the n-th day of the week (DAY_1 = Sunday).





ABMON_(1-12)


Abbreviated name of the n-th month of the year.





MON_(1-12)


Name of the n-th month of the year.





AM_STR


String for Ante meridian.





PM_STR


String for Post meridian.





D_T_FMT


String that can be used as the format string for 
strftime
 to represent time and date.





D_FMT


String that can be used as the format string for 
strftime
 to represent date.





T_FMT


String that can be used as the format string for 
strftime
 to represent time.





T_FMT_AMPM


String that can be used as the format string for 
strftime
 to represent time in 12-hour format with ante/post meridian.





ERA


Alternate era.





ERA_YEAR


Year in alternate era format.





ERA_D_T_FMT


Date and time in alternate era format (string can be used in 
strftime
).





ERA_D_FMT


Date in alternate era format (string can be used in 
strftime
).





ERA_T_FMT


Time in alternate era format (string can be used in 
strftime
).






LC_MONETARY Category Constants






INT_CURR_SYMBOL


International currency symbol.





CURRENCY_SYMBOL


Local currency symbol.





CRNCYSTR


Same value as CURRENCY_SYMBOL.





MON_DECIMAL_POINT


Decimal point character.





MON_THOUSANDS_SEP


Thousands separator (groups of three digits).





MON_GROUPING


Like 'grouping' element.





POSITIVE_SIGN


Sign for positive values.





NEGATIVE_SIGN


Sign for negative values.





INT_FRAC_DIGITS


International fractional digits.





FRAC_DIGITS


Local fractional digits.





P_CS_PRECEDES


Returns 1 if CURRENCY_SYMBOL precedes a positive value.





P_SEP_BY_SPACE


Returns 1 if a space separates CURRENCY_SYMBOL from a positive value.





N_CS_PRECEDES


Returns 1 if CURRENCY_SYMBOL precedes a negative value.





N_SEP_BY_SPACE


Returns 1 if a space separates CURRENCY_SYMBOL from a negative value.





P_SIGN_POSN






  Returns 0 if parentheses surround the quantity and currency_symbol.






 Returns 1 if the sign string precedes the quantity and currency_symbol.






 Returns 2 if the sign string follows the quantity and currency_symbol.






 Returns 3 if the sign string immediately precedes the currency_symbol.






 Returns 4 if the sign string immediately follows the currency_symbol.









N_SIGN_POSN






LC_NUMERIC Category Constants






DECIMAL_POINT


Decimal point character.





RADIXCHAR


Same value as DECIMAL_POINT.





THOUSANDS_SEP


Separator character for thousands (groups of three digits).





THOUSEP


Same value as THOUSANDS_SEP.





GROUPING








LC_MESSAGES Category Constants






YESEXPR


Regex string for matching 'yes' input.





NOEXPR


Regex string for matching 'no' input.





YESSTR


Output string for 'yes'.





NOSTR


Output string for 'no'.






LC_CTYPE Category Constants






CODESET


Return a string with the name of the character encoding.











http://cvs.php.net/viewvc.cgi/phd/tests/xhtml/data/003.xml?view=markup&rev=1.1
Index: phd/tests/xhtml/data/003.xml
+++ phd/tests/xhtml/data/003.xml


http://docbook.org/ns/docbook"; xml:id="function.nl-langinfo">
 
  nl_lan

[PHP-DOC] #37255 [Ver]: Column spanning with named columns doesn't work

2007-08-05 Thread bjori
 ID:  37255
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
 Status:  Verified
 Bug Type:Livedocs problem
 PHP Version: Irrelevant
 New Comment:

(Fixed in PhD) :)


Previous Comments:


[2007-06-19 18:40:52] [EMAIL PROTECTED]

The patch only fixes 50% of the problem, the colspan.
The rowspan is still screwed



[2007-06-05 22:36:28] [EMAIL PROTECTED]

Never mind. Philip had it archived, sorry :)



[2007-06-05 21:22:59] [EMAIL PROTECTED]

The patch is on a decommissioned server. I'll boot it up sometime and
re-upload. Maybe CC Jacques and see if he has a copy?



[2007-06-05 12:57:49] [EMAIL PROTECTED]

404 file not found...



[2006-05-01 02:58:21] [EMAIL PROTECTED]

Description:

This is a known bug (see livedocs/BUGS).

This patch solves the problem:
http://www.powertrip.co.za/livedocs/viewpatch.php?patch=22






-- 
Edit this bug report at http://bugs.php.net/?id=37255&edit=1


[PHP-DOC] #39030 [Opn]: table with colname (colspec problem)

2007-08-05 Thread bjori
 ID:  39030
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
 Status:  Open
 Bug Type:Livedocs problem
 PHP Version: Irrelevant
 New Comment:

This is fixed in PhD...


Previous Comments:


[2006-10-04 00:20:03] [EMAIL PROTECTED]

Description:

In en/reference/ibm_db2/functions/db2-set-option.xml

There are named columns
like that

  
  
  
  
  

and after 


  Connection
  Statement
  Result Set



is supposed to display the "value" into the col3, 4, and 5...

Livedocs displays the cell above in col1, 2, 3






-- 
Edit this bug report at http://bugs.php.net/?id=39030&edit=1


[PHP-DOC] cvs: phd /formats xhtml.php /include PhDFormat.class.php /tests/xhtml 002.phpt /tests/xhtml/data 002.xml

2007-08-05 Thread Hannes Magnusson
bjori   Sun Aug  5 22:50:04 2007 UTC

  Added files: 
/phd/tests/xhtml002.phpt 
/phd/tests/xhtml/data   002.xml 

  Modified files:  
/phd/formatsxhtml.php 
/phd/includePhDFormat.class.php 
  Log:
  - Fixed Livedocs bug#39030 (table with colname (colspec problem))
  - Add test
  
  http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.10&r2=1.11&diff_format=u
Index: phd/formats/xhtml.php
diff -u phd/formats/xhtml.php:1.10 phd/formats/xhtml.php:1.11
--- phd/formats/xhtml.php:1.10  Sun Aug  5 18:54:57 2007
+++ phd/formats/xhtml.php   Sun Aug  5 22:50:04 2007
@@ -1,5 +1,5 @@
 ', $valign);
 }
@@ -370,10 +371,17 @@
 if ($open) {
 $attrs = PhDFormat::getColspec(PhDFormat::getAttributes());
 
+$retval = "";
+if (isset($attrs["colname"])) {
+for($i=PhDFormat::getEntryOffset($attrs); $i>0; --$i) {
+$retval .= ' ';
+}
+}
+
 $colspan = PhDFormat::colspan($attrs);
 $rowspan = PhDFormat::rowspan($attrs);
 $moreattrs = self::parse_table_entry_attributes($attrs);
-return sprintf('', $colspan, 
$rowspan, $moreattrs);
+return sprintf('%s', $retval, 
$colspan, $rowspan, $moreattrs);
 }
 return "";
 }
http://cvs.php.net/viewvc.cgi/phd/include/PhDFormat.class.php?r1=1.3&r2=1.4&diff_format=u
Index: phd/include/PhDFormat.class.php
diff -u phd/include/PhDFormat.class.php:1.3 phd/include/PhDFormat.class.php:1.4
--- phd/include/PhDFormat.class.php:1.3 Sun Aug  5 18:54:57 2007
+++ phd/include/PhDFormat.class.php Sun Aug  5 22:50:04 2007
@@ -1,5 +1,5 @@
 TABLE["next_colnum"] = 1;
+}
+public function getEntryOffset(array $attrs) {
+$curr = $this->TABLE["next_colnum"];
+foreach($this->TABLE["colspec"] as $col => $spec) {
+if ($spec["colname"] == $attrs["colname"]) {
+$colnum = $spec["colnum"];
+$this->TABLE["next_colnum"] += $colnum-$curr;
+return $colnum-$curr;
+}
+}
+return -1;
+}
 public function colspan(array $attrs) {
 if (isset($attrs["namest"])) {
 foreach($this->TABLE["colspec"] as $colnum => $spec) {
@@ -99,8 +113,11 @@
 continue;
 }
 }
-return $to-$from+1;
+$colspan = $to-$from+1;
+$this->TABLE["next_colnum"] += $colspan;
+return $colspan;
 }
+$this->TABLE["next_colnum"]++;
 return 1;
 }
 public function rowspan($attrs) {

http://cvs.php.net/viewvc.cgi/phd/tests/xhtml/002.phpt?view=markup&rev=1.1
Index: phd/tests/xhtml/002.phpt
+++ phd/tests/xhtml/002.phpt
--TEST--
CALS Table rendering#002
--FILE--
getMap();

while($reader->read()) {
$type = $reader->nodeType;
$name = $reader->name;

switch($type) {
case XMLReader::ELEMENT:
case XMLReader::END_ELEMENT:
$open = $type == XMLReader::ELEMENT;

$funcname = "format_$name";
if (isset($map[$name])) {
$tag = $map[$name];
if (is_array($tag)) {
$tag = $reader->notXPath($tag);
}
if (strncmp($tag, "format_", 7)) {
$retval = $format->transformFromMap($open, $tag, $name);
break;
}
$funcname = $tag;
}

$retval = $format->{$funcname}($open, $name);
break;

case XMLReader::TEXT:
$retval = htmlspecialchars($reader->value, ENT_QUOTES);
break;

case XMLReader::CDATA:
$retval = $format->CDATA($reader->value);
break;

case XMLReader::COMMENT:
case XMLReader::WHITESPACE:
case XMLReader::SIGNIFICANT_WHITESPACE:
case XMLReader::DOC_TYPE:
/* swallow it */
continue 2;

default:
trigger_error("Don't know how to handle {$name} {$type}", E_USER_ERROR);
return;
}
echo $retval, "\n";
}

$reader->close();
?>
--EXPECT--



Resource-Parameter Matrix











Key


Value


Resource Type







  
Connection


Statement


Result Set





autocommit



DB2_AUTOCOMMIT_ON



X


-


-





autocommit



DB2_AUTOCOMMIT_OFF



X


-


-





cursor



DB2_SCROLLABLE



-


X


-





cursor



DB2_FORWARD_ONLY



-


X


-





binmode



DB2_BINARY



X


X


-





binmode



DB2_CONVERT



X


X


-





binmode



DB2_PASSTHRU



X


X


-





db2_attr_case



DB2_CASE_LOWER



X


X


-





db2_attr_case



DB2_CASE_UPPER



X


X


-





db2_attr_case



DB2_CASE_NATURAL



X


X


-





deferred_prepare



DB2_DEFERRED_PREPARE_ON



-


X


-





deferred_prepare



DB2_DEFERRED_PREPARE_OFF



-


X


-





i5_fetch_only



DB2_I5_FETCH_ON



-


X


-





i5_fetch_only



DB2_I5_FETCH_OFF



-


X


-





userid



SQL_ATTR_INFO_USERID



X


X


-





acctstr



SQL_ATTR_INF

[PHP-DOC] cvs: phpdoc /en/internals2/ze1/zendapi arguments.xml

2007-08-05 Thread Derick Rethans
derick  Sun Aug  5 21:17:40 2007 UTC

  Modified files:  
/phpdoc/en/internals2/ze1/zendapi   arguments.xml 
  Log:
  - Fixed double attribute
  #- Make test?
  
  
http://cvs.php.net/viewvc.cgi/phpdoc/en/internals2/ze1/zendapi/arguments.xml?r1=1.5&r2=1.6&diff_format=u
Index: phpdoc/en/internals2/ze1/zendapi/arguments.xml
diff -u phpdoc/en/internals2/ze1/zendapi/arguments.xml:1.5 
phpdoc/en/internals2/ze1/zendapi/arguments.xml:1.6
--- phpdoc/en/internals2/ze1/zendapi/arguments.xml:1.5  Sun Aug  5 20:15:40 2007
+++ phpdoc/en/internals2/ze1/zendapi/arguments.xml  Sun Aug  5 21:17:40 2007
@@ -1,5 +1,5 @@
 
- 
+ 
  http://docbook.org/ns/docbook";> 
   Accepting Arguments 
   
@@ -621,7 +621,7 @@
  CD-ROM.  shows 
the output.
  
 
-   
+   
 Cross-conversion behavior of PHP.
 
  


[PHP-DOC] cvs: phpdoc /en/internals2/ze1/zendapi arguments.xml overview.xml printing.xml

2007-08-05 Thread Hannes Magnusson
bjori   Sun Aug  5 20:15:40 2007 UTC

  Modified files:  
/phpdoc/en/internals2/ze1/zendapi   printing.xml overview.xml 
arguments.xml 
  Log:
  Fix build
  
  
http://cvs.php.net/viewvc.cgi/phpdoc/en/internals2/ze1/zendapi/printing.xml?r1=1.4&r2=1.5&diff_format=u
Index: phpdoc/en/internals2/ze1/zendapi/printing.xml
diff -u phpdoc/en/internals2/ze1/zendapi/printing.xml:1.4 
phpdoc/en/internals2/ze1/zendapi/printing.xml:1.5
--- phpdoc/en/internals2/ze1/zendapi/printing.xml:1.4   Fri Jul 13 11:59:18 2007
+++ phpdoc/en/internals2/ze1/zendapi/printing.xml   Sun Aug  5 20:15:40 2007
@@ -1,5 +1,5 @@
 
- 
+ 
  http://docbook.org/ns/docbook";> 
   Printing Information 
   
@@ -94,10 +94,10 @@
 

 
-
+
  Display of warning messages in the browser.
  
-  
+  
  
  
 
http://cvs.php.net/viewvc.cgi/phpdoc/en/internals2/ze1/zendapi/overview.xml?r1=1.4&r2=1.5&diff_format=u
Index: phpdoc/en/internals2/ze1/zendapi/overview.xml
diff -u phpdoc/en/internals2/ze1/zendapi/overview.xml:1.4 
phpdoc/en/internals2/ze1/zendapi/overview.xml:1.5
--- phpdoc/en/internals2/ze1/zendapi/overview.xml:1.4   Fri Jul 13 11:59:18 2007
+++ phpdoc/en/internals2/ze1/zendapi/overview.xml   Sun Aug  5 20:15:40 2007
@@ -1,5 +1,5 @@
 
- 
+ 
 
  http://docbook.org/ns/docbook";> 
   Overview 
@@ -66,10 +66,10 @@
 basics with some predefined functions. PHP contains all the
 modules that actually create the language's outstanding
 capabilities.
-
+
  The internal structure of PHP.
  
-  
+  
  
 
 
http://cvs.php.net/viewvc.cgi/phpdoc/en/internals2/ze1/zendapi/arguments.xml?r1=1.4&r2=1.5&diff_format=u
Index: phpdoc/en/internals2/ze1/zendapi/arguments.xml
diff -u phpdoc/en/internals2/ze1/zendapi/arguments.xml:1.4 
phpdoc/en/internals2/ze1/zendapi/arguments.xml:1.5
--- phpdoc/en/internals2/ze1/zendapi/arguments.xml:1.4  Fri Jul 13 11:59:18 2007
+++ phpdoc/en/internals2/ze1/zendapi/arguments.xml  Sun Aug  5 20:15:40 2007
@@ -1,5 +1,5 @@
 
- 
+ 
  http://docbook.org/ns/docbook";> 
   Accepting Arguments 
   
@@ -621,10 +621,10 @@
  CD-ROM.  shows 
the output.
  
 
-   
+   
 Cross-conversion behavior of PHP.
 
- 
+ 
 




[PHP-DOC] cvs: phd /formats xhtml.php /include PhDFormat.class.php /tests/xhtml 001.phpt /tests/xhtml/data 001-1.xml

2007-08-05 Thread Hannes Magnusson
bjori   Sun Aug  5 18:54:57 2007 UTC

  Added files: 
/phd/tests/xhtml001.phpt 
/phd/tests/xhtml/data   001-1.xml 

  Modified files:  
/phd/formatsxhtml.php 
/phd/includePhDFormat.class.php 
  Log:
  - Fix colspan logic
  - Fix regression in last commit
  - Implement tfoot
  - Add test
  
  http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.9&r2=1.10&diff_format=u
Index: phd/formats/xhtml.php
diff -u phd/formats/xhtml.php:1.9 phd/formats/xhtml.php:1.10
--- phd/formats/xhtml.php:1.9   Sun Aug  5 17:47:09 2007
+++ phd/formats/xhtml.php   Sun Aug  5 18:54:57 2007
@@ -1,5 +1,5 @@
  'format_systemitem',
 'table' => 'format_table',
 'term'  => 'span',
+'tfoot' => 'format_th',
+'thead' => 'format_th',
 'title' => array(
 /* DEFAULT */  'h1',
 'legalnotice'   => 'h4',
@@ -311,31 +313,36 @@
 }
 return "\n";
 }
+private function parse_table_entry_attributes($attrs) {
+$retval = sprintf('align="%s"', $attrs["align"]);
+if ($attrs["align"] == "char" && isset($attrs["char"])) {
+$retval .= sprintf(' char="%s"', htmlspecialchars($attrs["char"], 
ENT_QUOTES));
+if (isset($attrs["charoff"])) {
+$retval .= sprintf(' charoff="%s"', 
htmlspecialchars($attrs["charoff"], ENT_QUOTES));
+}
+}
+if (isset($attrs["valign"])) {
+$retval .= sprintf(' valign="%s"', $attrs["valign"]);
+}
+if (isset($attrs["colwidth"])) {
+$retval .= sprintf(' width="%d"', $attrs["colwidth"]);
+}
+return $retval;
+}
 public function format_colspec($open, $name) {
 if ($open) {
-$colspec = PhDFormat::colspec();
+$attrs = 
self::parse_table_entry_attributes(PhDFormat::colspec(PhDFormat::getAttributes()));
 
-$moreattr = "";
-if ($colspec["align"] == "char" && isset($colspec["char"])) {
-$moreattr .= sprintf(' char="%s"', 
htmlspecialchars($colspec["char"], ENT_QUOTES));
-if (isset($colspec["charoff"])) {
-$moreattr .= sprintf(' charoff="%s"', 
htmlspecialchars($colspec["charoff"], ENT_QUOTES));
-}
-}
-if (isset($colspec["colwidth"])) {
-$moreattr .= sprintf(' width="%d"', $colspec["colwidth"]);
-}
-
-return sprintf('', $colspec["align"], 
$moreattr);
+return sprintf('', $attrs);
 }
 /* noop */
 }
-public function format_thead($open, $name) {
+public function format_th($open, $name) {
 if ($open) {
 $valign = PhDFormat::valign();
-return sprintf('', $valign);
+return sprintf('<%s valign="%s">', $name, $valign);
 }
-return "\n";
+return "\n";
 }
 public function format_tbody($open, $name) {
 if ($open) {
@@ -353,16 +360,20 @@
 }
 public function format_th_entry($open, $name) {
 if ($open) {
-$colspan = PhDFormat::colspan();
+$attrs = PhDFormat::getAttributes();
+$colspan = PhDFormat::colspan($attrs);
 return sprintf('', $colspan);
 }
 return '';
 }
 public function format_entry($open, $name) {
 if ($open) {
-$colspan = PhDFormat::colspan();
-$rowspan = PhDFormat::rowspan();
-return sprintf('', $colspan, 
$rowspan);
+$attrs = PhDFormat::getColspec(PhDFormat::getAttributes());
+
+$colspan = PhDFormat::colspan($attrs);
+$rowspan = PhDFormat::rowspan($attrs);
+$moreattrs = self::parse_table_entry_attributes($attrs);
+return sprintf('', $colspan, 
$rowspan, $moreattrs);
 }
 return "";
 }
http://cvs.php.net/viewvc.cgi/phd/include/PhDFormat.class.php?r1=1.2&r2=1.3&diff_format=u
Index: phd/include/PhDFormat.class.php
diff -u phd/include/PhDFormat.class.php:1.2 phd/include/PhDFormat.class.php:1.3
--- phd/include/PhDFormat.class.php:1.2 Sun Aug  5 17:47:08 2007
+++ phd/include/PhDFormat.class.php Sun Aug  5 18:54:57 2007
@@ -1,5 +1,5 @@
 TABLE["colspec"][$colspec["colnum"]] = $colspec;
+return $colspec;
+}
+public function getColspec(array $attrs) {
 /* defaults */
 $defaults["colname"] = count($this->TABLE["colspec"])+1;
 $defaults["colnum"]  = count($this->TABLE["colspec"])+1;
 $defaults["align"]   = "left";
 
-$attrs = self::getAttributes();
-$colspec = array_merge($defaults, $this->TABLE["defaults"], $attrs);
-
-$this->TABLE["colspec"][$colspec["colnum"]] = $colspec;
-return $colspec;
+return array_merge($defaults, $this->TABLE["defaults"], $attrs);
  

[PHP-DOC] cvs: phd / build.php

2007-08-05 Thread Hannes Magnusson
bjori   Sun Aug  5 17:47:49 2007 UTC

  Modified files:  
/phdbuild.php 
  Log:
  Make sure we have a cache directory to write to
  
  
http://cvs.php.net/viewvc.cgi/phd/build.php?r1=1.5&r2=1.6&diff_format=u
Index: phd/build.php
diff -u phd/build.php:1.5 phd/build.php:1.6
--- phd/build.php:1.5   Sun Aug  5 14:49:55 2007
+++ phd/build.php   Sun Aug  5 17:47:49 2007
@@ -1,6 +1,6 @@
 #!/home/bjori/.apps/bin/php
 

[PHP-DOC] cvs: phd /formats xhtml.php /include PhDFormat.class.php

2007-08-05 Thread Hannes Magnusson
bjori   Sun Aug  5 17:47:09 2007 UTC

  Modified files:  
/phd/includePhDFormat.class.php 
/phd/formatsxhtml.php 
  Log:
  Improve CALS table rendering
  
  http://cvs.php.net/viewvc.cgi/phd/include/PhDFormat.class.php?r1=1.1&r2=1.2&diff_format=u
Index: phd/include/PhDFormat.class.php
diff -u phd/include/PhDFormat.class.php:1.1 phd/include/PhDFormat.class.php:1.2
--- phd/include/PhDFormat.class.php:1.1 Sun Aug  5 14:49:55 2007
+++ phd/include/PhDFormat.class.php Sun Aug  5 17:47:08 2007
@@ -1,11 +1,12 @@
 TABLE["cols"] = $attrs["cols"];
+unset($attrs["cols"]);
+
+$this->TABLE["defaults"] = $attrs;
+$this->TABLE["colspec"] = array();
+
+return $attrs;
+}
+public function colspec() {
+/* defaults */
+$defaults["colname"] = count($this->TABLE["colspec"])+1;
+$defaults["colnum"]  = count($this->TABLE["colspec"])+1;
+$defaults["align"]   = "left";
+
+$attrs = self::getAttributes();
+$colspec = array_merge($defaults, $this->TABLE["defaults"], $attrs);
+
+$this->TABLE["colspec"][$colspec["colnum"]] = $colspec;
+return $colspec;
+}
+public function valign() {
+$valign = self::readAttribute("valign");
+return $valign ? $valign : "middle";
+}
+public function colspan() {
+if ($start = $this->readAttribute("namest")) {
+$from = array_search($start, $this->TABLE["colspec"]);
+$end = $this->readAttribute("nameend");
+$to = array_search($end, $this->TABLE["colspec"]);
+return $end-$to;
+}
+return 1;
+}
+public function rowspan() {
+$rows = 1;
+if ($morerows = $this->readAttribute("morerows")) {
+$rows += $morerows;
+}
+return $rows;
+}
+
 }
 /*
-* vim600: sw=4 ts=4 fdm=syntax syntax=php et
-* vim<600: sw=4 ts=4
-*/
+ * vim600: sw=4 ts=4 fdm=syntax syntax=php et
+ * vim<600: sw=4 ts=4
+ */
 
http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.8&r2=1.9&diff_format=u
Index: phd/formats/xhtml.php
diff -u phd/formats/xhtml.php:1.8 phd/formats/xhtml.php:1.9
--- phd/formats/xhtml.php:1.8   Sun Aug  5 14:49:55 2007
+++ phd/formats/xhtml.php   Sun Aug  5 17:47:09 2007
@@ -1,5 +1,5 @@
  'span',
 'emphasis'  => 'em',
 'enumname'  => 'span',
-'entry' => array(
+'entry' => array (
 /* DEFAULT */  'format_entry',
 'row'   => array(
-/* DEFAULT */  'format_row_entry',
-'thead' => 'format_thead_entry',
-'tfoot' => 'format_tfoot_entry',
-'tbody' => 'format_tbody_entry',
+/* DEFAULT */  'format_entry',
+'thead' => 'format_th_entry',
+'tfoot' => 'format_th_entry',
+'tbody' => 'format_entry',
 ),
 ),
 'envar' => 'span',
@@ -298,8 +298,6 @@
 }
 
 
-/* TODO: Move the logic to PhDFormat? */
-/* NOTE: This is not a full implementation, just a proof-of-concept */
 public function format_table($open, $name) {
 if ($open) {
 return '';
@@ -308,72 +306,63 @@
 }
 public function format_tgroup($open, $name) {
 if ($open) {
-$this->TABLE_COLS = $this->readAttribute("cols");
-$this->COLSPEC = array();
+$attrs = PhDFormat::tgroup();
 return "\n";
 }
 return "\n";
 }
 public function format_colspec($open, $name) {
 if ($open) {
-$colname = $this->readAttribute("colname");
-if ($colnum = $this->readAttribute("colnum")) {
-$this->COLSPEC[$colnum] = $colname;
-} else {
-$count = count($this->COLSPEC);
-$this->COLSPEC[$count] = $colname;
+$colspec = PhDFormat::colspec();
+
+$moreattr = "";
+if ($colspec["align"] == "char" && isset($colspec["char"])) {
+$moreattr .= sprintf(' char="%s"', 
htmlspecialchars($colspec["char"], ENT_QUOTES));
+if (isset($colspec["charoff"])) {
+$moreattr .= sprintf(' charoff="%s"', 
htmlspecialchars($colspec["charoff"], ENT_QUOTES));
+}
+}
+if (isset($colspec["colwidth"])) {
+$moreattr .= sprintf(' width="%d"', $colspec["colwidth"]);
 }
-return ""; // Probably throw in couple of width and align 
attributes
+
+return sprintf('', $colspec["align"], 
$moreattr);
 }
 /* noop */
 }
 public function format_thead($open, $name) {
 if ($open) {
-return "";
+$valign = PhDFormat::valign();
+return sprintf('', $valign);

[PHP-DOC] cvs: phd / build.php mktoc.php /formats php.php xhtml.php /include PhDFormat.class.php PhDReader.class.php /themes phpweb.php

2007-08-05 Thread Hannes Magnusson
bjori   Sun Aug  5 14:49:55 2007 UTC

  Added files: 
/phdmktoc.php 
/phd/includePhDFormat.class.php 
/phd/formatsphp.php 
/phd/themes phpweb.php 

  Modified files:  
/phdbuild.php 
/phd/includePhDReader.class.php 
/phd/formatsxhtml.php 
  Log:
  Import PhD rev2
  
  http://cvs.php.net/viewvc.cgi/phd/build.php?r1=1.4&r2=1.5&diff_format=u
Index: phd/build.php
diff -u phd/build.php:1.4 phd/build.php:1.5
--- phd/build.php:1.4   Fri Jul 27 23:09:27 2007
+++ phd/build.php   Sun Aug  5 14:49:55 2007
@@ -1,15 +1,109 @@
+#!/home/bjori/.apps/bin/php
 seek( "function.dotnet-load" );
-echo date( DATE_RSS )." done seeking\n";
-
-ob_start();
-while( $phd->nextNode() ) {
-   print $phd->transform();
+function err($no, $str, $file, $line) {
+   global $notify;
+   if (strpos($str, "No mapper") !== false) {
+// $notify->update("Another missing function", strstr($str, 
"'"))->show();
+   return false;
+   }
+
+   $err = new PHNotify("Something wrong!", "$str\n$file:$line\n", 
"dialog-error");
+   $err
+   ->urgency(PHNotify::URGENCY_CRITICAL)
+   ->timeout(PHNotify::EXPIRES_NEVER)
+   ->hint("x", 1680/2)->hint("y", 1050/2)
+   ->show();
+   return false;
+}
+
+if ($err = extension_loaded("phnotify")) {
+   $notify = new PHNotify("Starting build");
+   $notify->urgency(PHNotify::URGENCY_LOW)->hint("x", 1680)->hint("y", 
10)->show();
+   $start = microtime(true);
+   set_error_handler("err");
+}
+
+require "include/PhDReader.class.php";
+require "include/PhDFormat.class.php";
+require "formats/xhtml.php";
+require "formats/php.php";
+require "themes/phpweb.php";
+require "mktoc.php";
+
+if ($err) {
+   $mktoc = microtime(true);
+   $notify
+   ->update("mktoc finished", sprintf("mktoc ran for %d 
sec", $mktoc-$start))
+   ->show();
+}
+
+$reader = new PhDReader("/home/bjori/php/doc/.manual.xml");
+$format = new phpweb($reader, $IDs, $IDMap);
+
+$map = $format->getMap();
+
+while($reader->read()) {
+$type = $reader->nodeType;
+$name = $reader->name;
+
+switch($type) {
+case XMLReader::ELEMENT:
+case XMLReader::END_ELEMENT:
+$open = $type == XMLReader::ELEMENT;
+
+$funcname = "format_$name";
+if (isset($map[$name])) {
+$tag = $map[$name];
+if (is_array($tag)) {
+$tag = $reader->notXPath($tag);
+}
+if (strncmp($tag, "format_", 7)) {
+$retval = $format->transformFromMap($open, $tag, $name);
+break;
+}
+$funcname = $tag;
+}
+
+$retval = $format->{$funcname}($open, $name);
+break;
+
+case XMLReader::TEXT:
+$retval = htmlspecialchars($reader->value, ENT_QUOTES);
+break;
+
+case XMLReader::CDATA:
+$retval = $format->CDATA($reader->value);
+break;
+
+case XMLReader::COMMENT:
+case XMLReader::WHITESPACE:
+case XMLReader::SIGNIFICANT_WHITESPACE:
+case XMLReader::DOC_TYPE:
+/* swallow it */
+continue 2;
+
+default:
+trigger_error("Don't know how to handle {$name} {$type}", 
E_USER_ERROR);
+return;
+}
+$format->appendData($retval, $reader->isChunk);
+}
+
+copy("cache/manual.php", "cache/index.php");
+$reader->close();
+
+if ($err) {
+   $end = microtime(true);
+   $notify
+   ->update(
+   "PhD build finished",
+   sprintf("mktoc build: %d sec\nPhD build  
 : %d sec\n--\nTotal time: %d seconds\n", $mktoc-$start, 
$end-$mktoc, $end-$start))
+   ->show();
 }
-$phd->close();
+/*
+* vim600: sw=4 ts=4 fdm=syntax syntax=php et
+* vim<600: sw=4 ts=4
+*/
 
-?>
http://cvs.php.net/viewvc.cgi/phd/include/PhDReader.class.php?r1=1.6&r2=1.7&diff_format=u
Index: phd/include/PhDReader.class.php
diff -u phd/include/PhDReader.class.php:1.6 phd/include/PhDReader.class.php:1.7
--- phd/include/PhDReader.class.php:1.6 Sat Jul 28 23:58:06 2007
+++ phd/include/PhDReader.class.php Sun Aug  5 14:49:55 2007
@@ -1,165 +1,224 @@
 
  |
-|Hannes Magnusson <[EMAIL PROTECTED]>  
   |
-| This source file is subject to the license that is bundled with this|
-| package in the file LICENSE, and is available through the   |
-| world-wide-web at the following url:|
-| http://phd.php.net/LICENSE  |
-+-+
-| The base class for reading the giant XML blob. This is intended for |
-| extension by output formats, and then for further extension by output   |
-| themes. This cla

[PHP-DOC] cvs: phpdoc /en/reference/regex/functions spliti.xml

2007-08-05 Thread Martin Samesch
samesch Sun Aug  5 12:25:57 2007 UTC

  Modified files:  
/phpdoc/en/reference/regex/functionsspliti.xml 
  Log:
  typos
  
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/regex/functions/spliti.xml?r1=1.9&r2=1.10&diff_format=u
Index: phpdoc/en/reference/regex/functions/spliti.xml
diff -u phpdoc/en/reference/regex/functions/spliti.xml:1.9 
phpdoc/en/reference/regex/functions/spliti.xml:1.10
--- phpdoc/en/reference/regex/functions/spliti.xml:1.9  Wed Jun 20 22:25:18 2007
+++ phpdoc/en/reference/regex/functions/spliti.xml  Sun Aug  5 12:25:57 2007
@@ -1,5 +1,5 @@
 
-
+
 http://docbook.org/ns/docbook"; xml:id="function.spliti">
  
   spliti
@@ -36,7 +36,7 @@
   
If you want to split on any of the characters which are considered
special by regular expressions, you'll need to escape them first. If
-   you think split (or any other regex function, for
+   you think spliti (or any other regex function, for
that matter) is doing something weird, please read the file
regex.7, included in the 
regex/ subdirectory of the PHP distribution. It's
@@ -73,7 +73,7 @@
   
Returns an array of strings, each of which is a substring of
string formed by splitting it on boundaries formed
-   by the case-sensitive regular expression pattern.
+   by the case insensitive regular expression pattern.
   
   
If there are n occurrences of
@@ -82,7 +82,7 @@
there is no occurrence of pattern, an array with
only one element will be returned. Of course, this is also true if
string is empty. If an error occurs,
-   split returns &false;.
+   spliti returns &false;.
   
  
 


[PHP-DOC] Notes Status, 18402 total

2007-08-05 Thread phpdoc
Following are the top 20 pages of the manual, sorted by the number
of user notes contributed. These sections could use a polish, those
notes represent 8.3% of the 18402 total user notes.

Notes  |  Page
---+-
   99  | http://php.net/manual/en/ref.session.php
   88  | http://php.net/manual/en/features.file-upload.php
   86  | http://php.net/manual/en/function.date.php
   85  | http://php.net/manual/en/ref.array.php
   82  | http://php.net/manual/en/ref.image.php
   81  | http://php.net/manual/en/reserved.variables.php
   80  | http://php.net/manual/en/function.rand.php
   79  | http://php.net/manual/en/function.array-search.php
   79  | http://php.net/manual/en/function.fgetcsv.php
   79  | http://php.net/manual/en/function.fsockopen.php
   74  | http://php.net/manual/en/ref.curl.php
   74  | http://php.net/manual/en/function.mssql-connect.php
   71  | http://php.net/manual/en/function.in-array.php
   69  | http://php.net/manual/en/function.exec.php
   68  | http://php.net/manual/en/function.strpos.php
   68  | http://php.net/manual/en/ref.com.php
   67  | http://php.net/manual/en/function.header.php
   66  | http://php.net/manual/en/control-structures.foreach.php
   65  | http://php.net/manual/en/function.array-unique.php
   64  | http://php.net/manual/en/features.http-auth.php