Whitespace fixes
This commit is contained in:
parent
49dc917b2e
commit
4b782efd54
|
@ -28,6 +28,7 @@ class Monitor {
|
||||||
foreach ($s as $k => $v) {
|
foreach ($s as $k => $v) {
|
||||||
if ( $k == 'Id' ) {
|
if ( $k == 'Id' ) {
|
||||||
continue;
|
continue;
|
||||||
|
# The reason for these is that the name overlaps Monitor fields.
|
||||||
} else if ( $k == 'Protocol' ) {
|
} else if ( $k == 'Protocol' ) {
|
||||||
$this->{'ControlProtocol'} = $v;
|
$this->{'ControlProtocol'} = $v;
|
||||||
} else if ( $k == 'Name' ) {
|
} else if ( $k == 'Name' ) {
|
||||||
|
@ -48,7 +49,7 @@ class Monitor {
|
||||||
return new Server( $this->{'ServerId'} );
|
return new Server( $this->{'ServerId'} );
|
||||||
}
|
}
|
||||||
public function __call( $fn, array $args){
|
public function __call( $fn, array $args){
|
||||||
if(isset($this->{$fn})){
|
if ( isset( $this->{$fn} ) ) {
|
||||||
return $this->{$fn};
|
return $this->{$fn};
|
||||||
#array_unshift($args, $this);
|
#array_unshift($args, $this);
|
||||||
#call_user_func_array( $this->{$fn}, $args);
|
#call_user_func_array( $this->{$fn}, $args);
|
||||||
|
@ -107,7 +108,7 @@ class Monitor {
|
||||||
} else if ( is_string( $v ) ) {
|
} else if ( is_string( $v ) ) {
|
||||||
$this->{$k} = trim( $v );
|
$this->{$k} = trim( $v );
|
||||||
} else {
|
} else {
|
||||||
Error( "Unknown type of var " . gettype( $v ) );
|
Error( "Unknown type of var " . gettype( $v ) );
|
||||||
$this->{$k} = $v;
|
$this->{$k} = $v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
require_once( 'database.php' );
|
require_once( 'database.php' );
|
||||||
class Server {
|
|
||||||
|
|
||||||
|
class Server {
|
||||||
public function __construct( $IdOrRow = NULL ) {
|
public function __construct( $IdOrRow = NULL ) {
|
||||||
$row = NULL;
|
$row = NULL;
|
||||||
if ( $IdOrRow ) {
|
if ( $IdOrRow ) {
|
||||||
|
@ -49,8 +49,8 @@ class Server {
|
||||||
public function __call( $fn, array $args= NULL){
|
public function __call( $fn, array $args= NULL){
|
||||||
if(isset($this->{$fn})){
|
if(isset($this->{$fn})){
|
||||||
return $this->{$fn};
|
return $this->{$fn};
|
||||||
#array_unshift($args, $this);
|
#array_unshift($args, $this);
|
||||||
#call_user_func_array( $this->{$fn}, $args);
|
#call_user_func_array( $this->{$fn}, $args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue