예제 #1
0
파일: Loop.php 프로젝트: RubiconPHP/Loop
 /**
  * @param callable $callback
  */
 public function __invoke(callable $callback)
 {
     $this->config->setCallback($callback);
     $this->start();
 }
예제 #2
0
 public function testCallbackAccessor()
 {
     $this->assertNull($this->instance->getCallback());
     $this->assertSame($this->instance, $this->instance->setCallback('trim'));
     $this->assertSame('trim', $this->instance->getCallback());
 }