[PHP] Re: [PEAR] PEAR

2002-04-03 Thread Martin Jansen

On Wed, 3 Apr 2002 20:12:46 +0100, Georgie Casey wrote:

The sites documentation is crap compared to PHP. 

I love to hear people critizing constructively.

what is it and how do i install it on my windows system?

Add the directory, where your PEAR code is located (e.g. c:\php4\pear),
to include_path in your php.ini and you're done.

and more, importantly do i have 2 force my host to install it or can i do it
myself. i'm just looking to use the file_find package.

Upload the desired package somewhere on your website and again
add the location to your include_path.

- Martin

-- 
  Martin Jansen, [EMAIL PROTECTED]
  http://www.martin-jansen.de/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /pear/DB common.php

2001-04-10 Thread Martin Jansen

mj  Tue Apr 10 01:03:47 2001 EDT

  Modified files:  
/php4/pear/DB   common.php 
  Log:
  fixed typo in inline docs
  
  
Index: php4/pear/DB/common.php
diff -u php4/pear/DB/common.php:1.42 php4/pear/DB/common.php:1.43
--- php4/pear/DB/common.php:1.42Mon Mar 26 16:57:24 2001
+++ php4/pear/DB/common.php Tue Apr 10 01:03:46 2001
@@ -671,7 +671,7 @@
  * '3' = 'three',
  *  )
  *
- * ...while the call getAssoc('SELECT id,text,date FROM mydate') returns:
+ * ...while the call getAssoc('SELECT id,text,date FROM mytable') returns:
  *   array(
  * '1' = array('one', '944679408'),
  * '2' = array('two', '944679408'),



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-CVS] cvs: CVSROOT / loginfo

2001-04-10 Thread Martin Jansen

On Tue, 10 Apr 2001 16:31:01 -, Rasmus Lerdorf wrote:

-pearweb $CVSROOT/CVSROOT/loginfo.pl [EMAIL PROTECTED] $USER %{sVv}
+pearweb $CVSROOT/CVSROOT/loginfo.pl [EMAIL PROTECTED] $USER %{sVv}

Wouldn't it be better to send the commit messages to
[EMAIL PROTECTED] or [EMAIL PROTECTED]?

-Martin



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /pear/HTML Table.php

2001-03-22 Thread Martin Jansen

mj  Thu Mar 22 06:32:51 2001 EDT

  Modified files:  
/php4/pear/HTML Table.php 
  Log:
  - Fixed bug reported by Bertrand Mansion.
  
  
Index: php4/pear/HTML/Table.php
diff -u php4/pear/HTML/Table.php:1.2 php4/pear/HTML/Table.php:1.3
--- php4/pear/HTML/Table.php:1.2Wed Mar 21 22:23:38 2001
+++ php4/pear/HTML/Table.phpThu Mar 22 06:32:51 2001
@@ -17,7 +17,7 @@
 // |  Bertrand Mansion [EMAIL PROTECTED] |
 // +--+
 //
-// $Id: Table.php,v 1.2 2001/03/22 06:23:38 mj Exp $
+// $Id: Table.php,v 1.3 2001/03/22 14:32:51 mj Exp $
 
 require_once "PEAR.php";
 require_once "HTML/Common.php";
@@ -419,7 +419,7 @@
*/
function setColAttributes($col, $attributes=null)
{
-   for ($i = 0; $i  $this-_cols; $i++) {
+   for ($i = 0; $i  $this-_rows; $i++) {
$this-setCellAttributes($i,$col,$attributes);
}
} // end func setColAttributes
@@ -432,7 +432,7 @@
*/
function updateColAttributes($col, $attributes=null)
{
-   for ($i = 0; $i  $this-_cols; $i++) {
+   for ($i = 0; $i  $this-_rows; $i++) {
$this-updateCellAttributes($i,$col,$attributes);
}
} // end func updateColAttributes



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /pear/HTML Common.php

2001-03-22 Thread Martin Jansen

mj  Thu Mar 22 07:27:07 2001 EDT

  Modified files:  
/php4/pear/HTML Common.php 
  Log:
  - removed wrong copyright notice.
  
  
Index: php4/pear/HTML/Common.php
diff -u php4/pear/HTML/Common.php:1.2 php4/pear/HTML/Common.php:1.3
--- php4/pear/HTML/Common.php:1.2   Wed Mar 21 22:23:38 2001
+++ php4/pear/HTML/Common.php   Thu Mar 22 07:27:07 2001
@@ -16,14 +16,13 @@
 // | Authors: Adam Daniel [EMAIL PROTECTED]|
 // +--+
 //
-// $Id: Common.php,v 1.2 2001/03/22 06:23:38 mj Exp $
+// $Id: Common.php,v 1.3 2001/03/22 15:27:07 mj Exp $
 
 /**
 * Base class for all HTML classes
 *
 * @author  Adam Daniel [EMAIL PROTECTED]
 * @version 1.3
-* @copyright   Copyright 2001 Ethicon Endo-Surgery
 * @since   PHP 4.0.3pl1
 */
 class HTML_Common {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /pear/HTML Common.php Table.php

2001-03-21 Thread Martin Jansen

mj  Wed Mar 21 22:23:38 2001 EDT

  Modified files:  
/php4/pear/HTML Common.php Table.php 
  Log:
  - some cosmetic changes in pear/html/HTML_Common and pear/html/HTML_Table for better
readability.
  
  

Index: php4/pear/HTML/Common.php
diff -u php4/pear/HTML/Common.php:1.1 php4/pear/HTML/Common.php:1.2
--- php4/pear/HTML/Common.php:1.1   Wed Mar 21 20:14:42 2001
+++ php4/pear/HTML/Common.php   Wed Mar 21 22:23:38 2001
@@ -16,7 +16,7 @@
 // | Authors: Adam Daniel [EMAIL PROTECTED]|
 // +--+
 //
-// $Id: Common.php,v 1.1 2001/03/22 04:14:42 adaniel Exp $
+// $Id: Common.php,v 1.2 2001/03/22 06:23:38 mj Exp $
 
 /**
 * Base class for all HTML classes
@@ -27,18 +27,21 @@
 * @since   PHP 4.0.3pl1
 */
 class HTML_Common {
+
 /**
 * Associative array of table attributes
 * @var  array
 * @access   private
 */
 var $_attributes = array();
+
 /**
 * Tab offset of the table
 * @var  int
 * @access   private
 */
 var $_tabOffset = 0;
+
 /**
 * Class constructor
 * @parammixed   $attributes Associative array of table tag attributes 
@@ -49,7 +52,8 @@
 {
 $this-setTabOffset($tabOffset);
 $this-setAttributes($attributes);
-}
+} // end constructor
+
 /**
 * Returns the current API version
 * @access   public
@@ -58,7 +62,8 @@
 function apiVersion()
 {
 return 1.3;
-}
+} // end func apiVersion
+
 /**
 * Returns a string of \t for the tabOffset property
 * @access   private
@@ -66,7 +71,8 @@
 function _getTabs()
 {
 return $this-_tabOffset  0 ? str_repeat("\t", $this-_tabOffset) : "";
-}
+} // end func _getTabs
+
 /**
 * Returns an HTML formatted attribute string
 * @paramarray   $attributes
@@ -86,7 +92,8 @@
 }
 }
 return $strAttr;
-}
+} // end func _getAttrString
+
 /**
 * Returns a valid atrributes array from either a string or array
 * @parammixed   $attributes Either a typical HTML attribute string or an 
associative array
@@ -118,7 +125,8 @@
 return $arrAttr;
 }
 }
-}
+} // end func _parseAttributes
+
 /**
 * Updates the attributes in $attr1 with the values in $attr2 without changing the 
other existing attributes
 * @paramarray   $attr1  Original attributes array
@@ -152,7 +160,8 @@
 }
 }
 }
-}
+} // end func _updateAtrrArray
+
 /**
 * Sets the HTML attributes
 * @parammixed   $attributes Either a typical HTML attribute string or an 
associative array
@@ -161,7 +170,8 @@
 function setAttributes($attributes) 
 {
 $this-_attributes = $this-_parseAttributes($attributes);
-}
+} // end func _setAttributes
+
 /**
 * Updates the passed attributes without changing the other existing attributes
 * @parammixed   $attributes Either a typical HTML attribute string or an 
associative array
@@ -171,7 +181,8 @@
 {
 $attributes = $this-_parseAttributes($attributes);
 $this-_updateAttrArray($this-_attributes, $attributes);
-}
+} // end func updateAttributes
+
 /**
 * Sets the tab offset
 * @paramint $offset
@@ -180,6 +191,7 @@
 function setTabOffset($offset)
 {
 $this-_tabOffset = $offset;
-}
-}
+} // end func setTabOffset
+
+} // end class HTML_Common
 ?
Index: php4/pear/HTML/Table.php
diff -u php4/pear/HTML/Table.php:1.1 php4/pear/HTML/Table.php:1.2
--- php4/pear/HTML/Table.php:1.1Wed Mar 21 20:15:42 2001
+++ php4/pear/HTML/Table.phpWed Mar 21 22:23:38 2001
@@ -14,10 +14,10 @@
 // | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
 // +--+
 // | Authors: Adam Daniel [EMAIL PROTECTED]|
-// |  Bertrand Mansion [EMAIL PROTECTED] 
|
+// |  Bertrand Mansion [EMAIL PROTECTED] |
 // +--+
 //
-// $Id: Table.php,v 1.1 2001/03/22 04:15:42 adaniel Exp $
+// $Id: Table.php,v 1.2 2001/03/22 06:23:38 mj Exp $
 
 require_once "PEAR.php";
 require_once "HTML/Common.php";
@@ -31,40 +31,46 @@
 * @since   PHP 4.0.3pl1
 *
 * Example:
-   $table = new HTML_Table;
-   ...
+*   $table = new HTML_Table;
+*   ...
 */
 class HTML_Table extends HTML_Common {
+
/**
* Automatically adds a new row or column if a given row or column index does 
not exist
* @var  bool
* @access   private
*/
var $_autoGrow = true;
+
/**
* Value to insert into empty cells
* @var  string
* @access   

Re: [PHP-CVS] cvs: php4 /pear/HTML Common.php

2001-03-21 Thread Martin Jansen

On Thu, 22 Mar 2001 04:14:43 -, Adam Daniel wrote:

* @copyright   Copyright 2001 Ethicon Endo-Surgery

Isn't this a contradiction to the copyright notice of
the license in the head of the file?

-Martin


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /pear Cache.php

2001-03-04 Thread Martin Jansen

mj  Sun Mar  4 06:26:59 2001 EDT

  Modified files:  
/php4/pear  Cache.php 
  Log:
  fixed typo
  
  
Index: php4/pear/Cache.php
diff -u php4/pear/Cache.php:1.3 php4/pear/Cache.php:1.4
--- php4/pear/Cache.php:1.3 Sat Mar  3 11:21:49 2001
+++ php4/pear/Cache.php Sun Mar  4 06:26:58 2001
@@ -16,7 +16,7 @@
 // |  Sebastian Bergmann [EMAIL PROTECTED]   |
 // +--+
 //
-// $Id: Cache.php,v 1.3 2001/03/03 19:21:49 uw Exp $
+// $Id: Cache.php,v 1.4 2001/03/04 14:26:58 mj Exp $
 
 /**
 * Cache is a base class for cache implementations.
@@ -24,7 +24,7 @@
 * TODO: Simple usage example goes here.
 *
 * @author   Ulf Wendel [EMAIL PROTECTED]
-* @version  $Id: Cache.php,v 1.3 2001/03/03 19:21:49 uw Exp $
+* @version  $Id: Cache.php,v 1.4 2001/03/04 14:26:58 mj Exp $
 * @package  Cache
 * @access   public 
 */
@@ -86,7 +86,7 @@
 $storage_class = 'Cache_Container_' . $storage_driver;
 $storage_classfile = 'Cache/Container/' . $storage_driver . '.php';
 
-include_once $storage_classfile
+include_once $storage_classfile;
 $this-container = new $storage_class($storage_options);
 $this-garbageCollection();
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /pear/Benchmark Iterate.php

2001-03-02 Thread Martin Jansen

mj  Fri Mar  2 10:24:00 2001 EDT

  Modified files:  
/php4/pear/BenchmarkIterate.php 
  Log:
  - added check for existing bcmath extensions 
to Benchmark/Iterate.php
  
  - did some cosmetic changes to Benchmark/Iterate.php
  
  
Index: php4/pear/Benchmark/Iterate.php
diff -u php4/pear/Benchmark/Iterate.php:1.4 php4/pear/Benchmark/Iterate.php:1.5
--- php4/pear/Benchmark/Iterate.php:1.4 Tue Jan  9 17:01:53 2001
+++ php4/pear/Benchmark/Iterate.php Fri Mar  2 10:23:59 2001
@@ -16,7 +16,7 @@
 // | Authors: Sebastian Bergmann [EMAIL PROTECTED]   |
 // +--+
 //
-// $Id: Iterate.php,v 1.4 2001/01/10 01:01:53 ssb Exp $
+// $Id: Iterate.php,v 1.5 2001/03/02 18:23:59 mj Exp $
 //
 
 require_once 'Benchmark/Timer.php';
@@ -32,12 +32,12 @@
 * 
 * $benchmark = new Benchmark_Iterate;
 * 
-* $benchmark-run( 'my_function', 100 );
+* $benchmark-run('my_function', 100);
 * 
 * $result = $benchmark-get();
 * 
 * @author   Sebastian Bergmann [EMAIL PROTECTED]
-* @version  $Revision: 1.4 $
+* @version  $Revision: 1.5 $
 * @access   public
 */
 
@@ -59,13 +59,13 @@
 for($i = 1; $i = $iterations; $i++)
 {
 // set 'start' marker for current iteration
-$this-set_marker('start_' . $i);
+$this-set_marker('start_'.$i);
 
 // call function to be benchmarked
 call_user_func($function);
 
 // set 'end' marker for current iteration
-$this-set_marker('end_' . $i);
+$this-set_marker('end_'.$i);
 }
 }
 
@@ -75,9 +75,9 @@
 /**
 * Returns benchmark result.
 *
-* $result[ x] = execution time of iteration x
-* $result[ 'mean'   ] = mean execution time
-* $result[ 'iterations' ] = number of iterations
+* $result[x   ] = execution time of iteration x
+* $result['mean'  ] = mean execution time
+* $result['iterations'] = number of iterations
 *
 * @return array $result
 * @access public
@@ -97,20 +97,28 @@
 for($i = 1; $i = $iterations; $i++)
 {
 // get elapsed time for current iteration
-$time = $this-time_elapsed('start_' . $i , 'end_' . $i);
+$time = $this-time_elapsed('start_'.$i , 'end_'.$i);
 
 // sum up total time spent
-$total = bcadd($total, $time, 6);
-
+if (extension_loaded('bcmath')) {
+$total = bcadd($total, $time, 6);
+} else {
+$total = $total + $time;
+}
+
 // store time
-$result[ $i ] = $time;
+$result[$i] = $time;
 }
 
 // calculate and store mean time
-$result[ 'mean' ] = bcdiv($total, $iterations, 6);
+if (extension_loaded('bcmath')) {
+$result['mean'] = bcdiv($total, $iterations, 6);
+} else {
+$result['mean'] = $total / $iterations;
+}
 
 // store iterations
-$result[ 'iterations' ] = $iterations;
+$result['iterations'] = $iterations;
 
 // return result array
 return $result;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]