cvs: php4 /scripts/ext_skel_ng php_logo.php xml_stream_callback_parser.php

From: Date: Sat, 26 Apr 2003 15:27:36 +0000
Subject: cvs: php4 /scripts/ext_skel_ng php_logo.php xml_stream_callback_parser.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-20511@lists.php.net to get a copy of this message
hholzgra Sat Apr 26 11:27:36 2003 EDT Modified files: /php4/scripts/ext_skel_ng php_logo.php xml_stream_callback_parser.php Log: php 5 constructor style and whitespace Index: php4/scripts/ext_skel_ng/php_logo.php diff -u php4/scripts/ext_skel_ng/php_logo.php:1.1 php4/scripts/ext_skel_ng/php_logo.php:1.2 --- php4/scripts/ext_skel_ng/php_logo.php:1.1 Wed Feb 26 05:06:46 2003 +++ php4/scripts/ext_skel_ng/php_logo.php Sat Apr 26 11:27:26 2003 @@ -1,7 +1,8 @@ <?php class php_logo extends php_element { - function php_logo($name, $attr) { + + function __construct($name, $attr) { $this->name = $name; $this->attr = $attr; $this->id = '"'.strtoupper($name).'_LOGO_ID"'; @@ -32,11 +33,11 @@ $len = strlen($this->data); $code = " "; $i=0; - for($n = 0; $n < $len; $n++) { + for ($n = 0; $n < $len; $n++) { $code .= sprintf(" %3d",ord($this->data[$n])); - if($n == $len - 1) break; + if ($n == $len - 1) break; $code .= ","; - if(++$i==8) { + if (++$i==8) { $code .= "\n "; $i=0; } Index: php4/scripts/ext_skel_ng/xml_stream_callback_parser.php diff -u php4/scripts/ext_skel_ng/xml_stream_callback_parser.php:1.1 php4/scripts/ext_skel_ng/xml_stream_callback_parser.php:1.2 --- php4/scripts/ext_skel_ng/xml_stream_callback_parser.php:1.1 Wed Feb 19 05:07:22 2003 +++ php4/scripts/ext_skel_ng/xml_stream_callback_parser.php Sat Apr 26 11:27:28 2003 @@ -1,11 +1,12 @@ <?php class xml_stream_callback_parser extends xml_stream_parser { - function xml_stream_callback_parser ($stream) { + + function __construct($stream) { $this->cdata = ""; $this->tags = array(); $this->attrs = array(); - parent::xml_stream_parser($stream); + parent::__construct($stream); } function cdata($parser, $cdata) { @@ -22,7 +23,7 @@ for ($tags = $this->tags; count($tags); array_shift($tags)) { $method = "handle_".join("_", $tags); - if(method_exists($this, $method)) { + if (method_exists($this, $method)) { $this->$method($attributes); break; }

« previous php.cvs (#20511) next »