Predis\Transaction\MultiExecState::flag PHP Метод

flag() публичный Метод

Sets one or more flags.
public flag ( integer $flags )
$flags integer Set of flags
    public function flag($flags)
    {
        $this->flags |= $flags;
    }

Usage Example

 /**
  * @group disconnected
  */
 public function testIsWatchAllowed()
 {
     $state = new MultiExecState();
     $this->assertFalse($state->isWatchAllowed());
     $state->flag(MultiExecState::INITIALIZED);
     $this->assertTrue($state->isWatchAllowed());
     $state->flag(MultiExecState::CAS);
     $this->assertFalse($state->isWatchAllowed());
     $state->unflag(MultiExecState::CAS);
     $this->assertTrue($state->isWatchAllowed());
 }