any() 공개 정적인 메소드

If all yieldables failed, AllFailedException is thrown. If no yieldables found, AllFailedException is thrown.
public static any ( mixed $value ) : Generator
$value mixed
리턴 Generator Resolved value.
예제 #1
0
파일: ControlTest.php 프로젝트: mpyw/co
 public function testAnyEmpty()
 {
     try {
         Co::wait(Co::any(['A', 'B']));
         $this->assertTrue(false);
     } catch (AllFailedException $e) {
         $this->assertEquals('Co::any() failed.', $e->getMessage());
         $this->assertEquals(['A', 'B'], $e->getReasons());
     }
 }