add setting of object property

pull/1624/head
Isaac Connor 2016-06-24 10:30:56 -04:00
parent 6644db3bea
commit 791c8fb3d5
1 changed files with 4 additions and 1 deletions

View File

@ -151,6 +151,9 @@ private $control_fields = array(
return new Server( $this->{'ServerId'} );
}
public function __call( $fn, array $args){
if ( count( $args ) ) {
$this->{$fn} = $args[0];
}
if ( isset( $this->{$fn} ) ) {
return $this->{$fn};
#array_unshift($args, $this);
@ -219,7 +222,7 @@ private $control_fields = array(
} else if ( is_string( $v ) ) {
$this->{$k} = trim( $v );
} else {
Error( "Unknown type of var " . gettype( $v ) );
Error( "Unknown type $k => $v of var " . gettype( $v ) );
$this->{$k} = $v;
}
}