PHP Класс mpyw\Co\Internal\ControlUtils

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
anyOrRace ( mixed $value, callable $filter, string $message ) : Generator Executed by Co::any() or Co::race().
fail ( mixed $yieldable ) : Generator Handle success as ControlException.
getWrapperGenerator ( array $yieldables, callable $filter ) : Generator Wrap yieldables with specified filter function.
reverse ( mixed $yieldable ) : Generator Handle success as ControlException, failure as resolved.

Описание методов

anyOrRace() публичный статический метод

Executed by Co::any() or Co::race().
public static anyOrRace ( mixed $value, callable $filter, string $message ) : Generator
$value mixed
$filter callable self::reverse or self::fail.
$message string Used for failure.
Результат Generator

fail() публичный статический метод

Handle success as ControlException.
public static fail ( mixed $yieldable ) : Generator
$yieldable mixed
Результат Generator

getWrapperGenerator() публичный статический метод

Wrap yieldables with specified filter function.
public static getWrapperGenerator ( array $yieldables, callable $filter ) : Generator
$yieldables array
$filter callable self::reverse or self::fail.
Результат Generator

reverse() публичный статический метод

Handle success as ControlException, failure as resolved.
public static reverse ( mixed $yieldable ) : Generator
$yieldable mixed
Результат Generator