Skip to content

Commit

Permalink
Added getId method.
Browse files Browse the repository at this point in the history
  • Loading branch information
andot committed Jul 27, 2016
1 parent a896603 commit 6566118
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Hprose/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,12 @@ private function autoId() {
$args = array();
return Future\toFuture($this->invoke('#', $args, $settings));
}
public function getId() {
if ($this->id == null) {
$this->id = $this->autoId();
}
return $this->id;
}
/*
This method is a private method.
But PHP 5.3 can't call private method in closure,
Expand Down

0 comments on commit 6566118

Please sign in to comment.