summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2003-04-26 15:27:28 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2003-04-26 15:27:28 +0000
commit5b665eb3672762d468434ff6d3e5621b48f2c928 (patch)
tree83a6ab912f1ac7a2cd3889ccd14d79172f8a3639
parentf8f4e049098a4eaa63e5cda71ff7882e0655b7fd (diff)
downloadphp-git-5b665eb3672762d468434ff6d3e5621b48f2c928.tar.gz
php 5 constructor style and whitespace
-rw-r--r--scripts/ext_skel_ng/php_logo.php9
-rw-r--r--scripts/ext_skel_ng/xml_stream_callback_parser.php7
2 files changed, 9 insertions, 7 deletions
diff --git a/scripts/ext_skel_ng/php_logo.php b/scripts/ext_skel_ng/php_logo.php
index 5d2adf6fad..e7fa4b56f0 100644
--- a/scripts/ext_skel_ng/php_logo.php
+++ b/scripts/ext_skel_ng/php_logo.php
@@ -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 @@ static unsigned char {$this->name}_logo[] = {
$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;
}
diff --git a/scripts/ext_skel_ng/xml_stream_callback_parser.php b/scripts/ext_skel_ng/xml_stream_callback_parser.php
index 50f1a1c5be..5ac0d62d31 100644
--- a/scripts/ext_skel_ng/xml_stream_callback_parser.php
+++ b/scripts/ext_skel_ng/xml_stream_callback_parser.php
@@ -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;
}