DataSift\Storyplayer\Output::setSilentMode PHP 메소드

setSilentMode() 공개 메소드

in 'silent' mode, we do not write log activity to the output writer at all. HOWEVER, the plugin may still add the log activity to any internal cache it has (can be useful for error reports etc)
public setSilentMode ( ) : void
리턴 void
    public function setSilentMode()
    {
        foreach ($this->plugins as $plugin) {
            $plugin->setSilentMode();
        }
    }

Usage Example

예제 #1
0
 /**
  * @covers DataSift\Storyplayer\Output::setSilentMode()
  */
 public function testCanSetSilentMode()
 {
     // ----------------------------------------------------------------
     // setup the test
     $plugin1 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
     $plugin1->shouldReceive('setSilentMode')->once();
     $plugin2 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
     $plugin2->shouldReceive('setSilentMode')->once();
     $obj = new Output();
     $obj->usePluginInSlot($plugin1, "console");
     $obj->usePluginInSlot($plugin2, "slot1");
     // ----------------------------------------------------------------
     // perform the change
     $obj->setSilentMode();
     // ----------------------------------------------------------------
     // test the results
     Mockery::close();
 }