add Url and __call functions

pull/1207/head
Isaac Connor 2015-12-01 15:16:07 -05:00
parent 382ad0f390
commit 2dfa6d6bae
1 changed files with 9 additions and 2 deletions

View File

@ -17,8 +17,8 @@ class Server {
}
}
public function Name() {
return $this->{'Name'};
public function Url() {
return ZM_BASE_PROTOCOL . '://'. $this->Hostname();
}
public function Hostname() {
if ( isset( $this->{'Hostname'} ) and ( $this->{'Hostname'} != '' ) ) {
@ -26,5 +26,12 @@ class Server {
}
return $this->{'Name'};
}
public function __call( $fn, array $args= NULL){
if(isset($this->{$fn})){
return $this->{$fn};
#array_unshift($args, $this);
#call_user_func_array( $this->{$fn}, $args);
}
}
}
?>