diff --git a/jphp-core/api-docs/README.md b/jphp-core/api-docs/README.md index b69180293..90031f3e0 100644 --- a/jphp-core/api-docs/README.md +++ b/jphp-core/api-docs/README.md @@ -3,13 +3,13 @@ --- ## jphp-core -> version 1.0.3, created by JPPM. +> version 1.0.4, created by JPPM. Compiler and Launcher for JPHP. ### Install ``` -jppm add jphp-core@1.0.3 +jppm add jphp-core@1.0.4 ``` ### API diff --git a/jphp-core/api-docs/README.ru.md b/jphp-core/api-docs/README.ru.md index 75a686098..b86f5e565 100644 --- a/jphp-core/api-docs/README.ru.md +++ b/jphp-core/api-docs/README.ru.md @@ -3,13 +3,13 @@ --- ## jphp-core -> версия 1.0.3, создано с помощью JPPM. +> версия 1.0.4, создано с помощью JPPM. Compiler and Launcher for JPHP. ### Установка ``` -jppm add jphp-core@1.0.3 +jppm add jphp-core@1.0.4 ``` ### АПИ diff --git a/jphp-runtime/api-docs/classes/php/util/Flow.md b/jphp-runtime/api-docs/classes/php/util/Flow.md index a90c8c224..54fb87ee0 100644 --- a/jphp-runtime/api-docs/classes/php/util/Flow.md +++ b/jphp-runtime/api-docs/classes/php/util/Flow.md @@ -29,6 +29,9 @@ Class Flow, Immutable - `->`[`withKeys()`](#method-withkeys) - _Enables to save keys for the next operation_ - `->`[`onlyKeys()`](#method-onlykeys) - `->`[`append()`](#method-append) - _Appends a new collection to the current flow,_ +- `->`[`anyMatch()`](#method-anymatch) - _Returns whether any elements of this stream match the provided_ +- `->`[`allMatch()`](#method-allmatch) - _Returns whether all elements of this stream match the provided predicate._ +- `->`[`noneMatch()`](#method-nonematch) - _Returns whether no elements of this stream match the provided predicate._ - `->`[`find()`](#method-find) - _Finds elements by using the $filter callback,_ - `->`[`findOne()`](#method-findone) - _Finds the first element by using the $filter callback,_ - `->`[`findValue()`](#method-findvalue) @@ -153,6 +156,45 @@ do not remember that you can pass a flow to this method --- + + +### anyMatch() +```php +anyMatch(callable $predicate): bool +``` +Returns whether any elements of this stream match the provided +predicate. May not evaluate the predicate on all elements if not +necessary for determining the result. If the flow is empty then +`false` is returned and the predicate is not evaluated. + +--- + + + +### allMatch() +```php +allMatch(callable $predicate): bool +``` +Returns whether all elements of this stream match the provided predicate. +May not evaluate the predicate on all elements if not necessary for +determining the result. If the flow is empty then `true` is +returned and the predicate is not evaluated. + +--- + + + +### noneMatch() +```php +noneMatch(callable $predicate): bool +``` +Returns whether no elements of this stream match the provided predicate. +May not evaluate the predicate on all elements if not necessary for +determining the result. If the flow is empty then `true` is +returned and the predicate is not evaluated. + +--- + ### find() @@ -160,7 +202,7 @@ do not remember that you can pass a flow to this method find(callable $filter): php\util\Flow ``` Finds elements by using the $filter callback, -elements - for each iteration that returns ``true`` +elements - for each iteration that returns `true` --- @@ -171,7 +213,7 @@ elements - for each iteration that returns ``true`` findOne(callable $filter): mixed ``` Finds the first element by using the $filter callback, -when $filter will return the first ``true`` +when $filter will return the first `true` --- diff --git a/jphp-runtime/api-docs/classes/php/util/Flow.ru.md b/jphp-runtime/api-docs/classes/php/util/Flow.ru.md index 8e888a759..c107ed2fa 100644 --- a/jphp-runtime/api-docs/classes/php/util/Flow.ru.md +++ b/jphp-runtime/api-docs/classes/php/util/Flow.ru.md @@ -29,6 +29,9 @@ Class Flow, Immutable - `->`[`withKeys()`](#method-withkeys) - _Enables to save keys for the next operation_ - `->`[`onlyKeys()`](#method-onlykeys) - `->`[`append()`](#method-append) - _Appends a new collection to the current flow,_ +- `->`[`anyMatch()`](#method-anymatch) - _Returns whether any elements of this stream match the provided_ +- `->`[`allMatch()`](#method-allmatch) - _Returns whether all elements of this stream match the provided predicate._ +- `->`[`noneMatch()`](#method-nonematch) - _Returns whether no elements of this stream match the provided predicate._ - `->`[`find()`](#method-find) - _Finds elements by using the $filter callback,_ - `->`[`findOne()`](#method-findone) - _Finds the first element by using the $filter callback,_ - `->`[`findValue()`](#method-findvalue) @@ -153,6 +156,45 @@ do not remember that you can pass a flow to this method --- + + +### anyMatch() +```php +anyMatch(callable $predicate): bool +``` +Returns whether any elements of this stream match the provided +predicate. May not evaluate the predicate on all elements if not +necessary for determining the result. If the flow is empty then +`false` is returned and the predicate is not evaluated. + +--- + + + +### allMatch() +```php +allMatch(callable $predicate): bool +``` +Returns whether all elements of this stream match the provided predicate. +May not evaluate the predicate on all elements if not necessary for +determining the result. If the flow is empty then `true` is +returned and the predicate is not evaluated. + +--- + + + +### noneMatch() +```php +noneMatch(callable $predicate): bool +``` +Returns whether no elements of this stream match the provided predicate. +May not evaluate the predicate on all elements if not necessary for +determining the result. If the flow is empty then `true` is +returned and the predicate is not evaluated. + +--- + ### find() @@ -160,7 +202,7 @@ do not remember that you can pass a flow to this method find(callable $filter): php\util\Flow ``` Finds elements by using the $filter callback, -elements - for each iteration that returns ``true`` +elements - for each iteration that returns `true` --- @@ -171,7 +213,7 @@ elements - for each iteration that returns ``true`` findOne(callable $filter): mixed ``` Finds the first element by using the $filter callback, -when $filter will return the first ``true`` +when $filter will return the first `true` --- diff --git a/jphp-runtime/src/php/runtime/ext/core/classes/WrapProcess.java b/jphp-runtime/src/php/runtime/ext/core/classes/WrapProcess.java index 03e7032dc..c3a4671d0 100644 --- a/jphp-runtime/src/php/runtime/ext/core/classes/WrapProcess.java +++ b/jphp-runtime/src/php/runtime/ext/core/classes/WrapProcess.java @@ -59,13 +59,17 @@ public Memory __construct(Environment env, Memory... args) { return Memory.NULL; } - protected Process getProcess() { + public Process getProcess() { if (process == null) throw new IllegalStateException("Process is not started, use the start() method to initialize it"); return process; } + public ProcessBuilder getProcessBuilder() { + return processBuilder; + } + @Signature public WrapProcess inheritIO() { if (processBuilder == null)