lithium\console\Response::output PHP 메소드

output() 공개 메소드

Writes string to output stream
public output ( string $output ) : mixed
$output string
리턴 mixed
    public function output($output)
    {
        return fwrite($this->output, String::insert($output, $this->styles()));
    }

Usage Example

 public function testOutput()
 {
     $base = Libraries::get(true, 'resources') . '/tmp/tests';
     $this->skipIf(!is_writable($base), "Path `{$base}` is not writable.");
     $response = new Response(array('output' => fopen($this->streams['output'], 'w+')));
     $this->assertTrue(is_resource($response->output));
     $this->assertEqual(2, $response->output('ok'));
     $this->assertEqual('ok', file_get_contents($this->streams['output']));
 }
All Usage Examples Of lithium\console\Response::output