src/PAGI/Node/Node.php
protected function callClientMethods($methods, $stopWhen = null)
    {
        $result = null;
        foreach ($methods as $callInfo) {
            foreach ($callInfo as $name => $arguments) {
                $result = $this->callClientMethod($name, $arguments);
                if ($stopWhen !== null) {
                    if ($stopWhen($result)) {
                        return $result;
                    }
                }
            }
        }
        return $result;
    }
protected function callClientMethods($methods, $stopWhen = null)
    {
        $result = null;
        foreach ($methods as $callInfo) {
            foreach ($callInfo as $name => $arguments) {
                $result = $this->callClientMethod($name, $arguments);
                if ($stopWhen !== null) {
                    if ($stopWhen($result)) {
                        return $result;
                    }
                }
            }
        }
        return $result;
    }
protected function callClientMethods ( $ methods , $ stopWhen = null ) { $ result = null ; foreach ( $ methods as $ callInfo ) { foreach ( $ callInfo as $ name => $ arguments ) { $ result = $ this -> callClientMethod ( $ name , $ arguments ) ; if ( $ stopWhen !== null ) { if ( $ stopWhen ( $ result ) ) { return $ result ; } } } } return $ result ; }
Calls methods in the PAGI client.

@param methodInfo[] $methods Methods to call, an array of arrays. The
second array has the method name as key and an array of arguments as
value.
@param \Closure $stopWhen If any, this callback is evaluated before
returning. Will return when false.

@return IResult
Calls methods in the PAGI client .