add Url and __call functions
parent
382ad0f390
commit
2dfa6d6bae
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue