Catch methods.

This commit is contained in:
sc0Vu 2018-01-09 18:21:18 +08:00
parent 8ed8d69362
commit 6c4e422bfd
2 changed files with 6 additions and 0 deletions

View File

@ -95,6 +95,9 @@ class Net
// new the method
$methodClass = sprintf("\Web3\Methods\%s\%s", ucfirst($class[1]), ucfirst($name));
$methodObject = new $methodClass($method, $arguments);
$this->methods[$method] = $methodObject;
} else {
$methodObject = $this->methods[$method];
}
$inputs = $methodObject->transform($arguments, $methodObject->inputFormatters);
$methodObject->arguments = $inputs;

View File

@ -128,6 +128,9 @@ class Web3
// new the method
$methodClass = sprintf("\Web3\Methods\%s\%s", ucfirst($class[1]), ucfirst($name));
$methodObject = new $methodClass($method, $arguments);
$this->methods[$method] = $methodObject;
} else {
$methodObject = $this->methods[$method];
}
$inputs = $methodObject->transform($arguments, $methodObject->inputFormatters);
$methodObject->arguments = $inputs;