lithium\console\Request::input PHP Method

input() public method

Reads a line from input.
public input ( ) : string
return string
    public function input()
    {
        return fgets($this->input);
    }

Usage Example

Example #1
0
 public function testInput()
 {
     $base = LITHIUM_APP_PATH . '/resources/tmp/tests';
     $this->skipIf(!is_writable($base), "{$base} is not writable.");
     $stream = fopen($this->streams['input'], 'w+');
     $request = new Request(array('input' => $stream));
     $this->assertTrue(is_resource($request->input));
     $this->assertEqual($stream, $request->input);
     $expected = 2;
     $result = fwrite($request->input, 'ok');
     $this->assertEqual($expected, $result);
     rewind($request->input);
     $expected = 'ok';
     $result = $request->input();
     $this->assertEqual($expected, $result);
 }
All Usage Examples Of lithium\console\Request::input