lithium\net\socket\Curl::read PHP Метод

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

The read method will utilize the curl options that have been set.
public read ( ) : mixed
Результат mixed Boolean false if the resource handle is unavailable, and the result of `curl_exec` otherwise.
    public function read()
    {
        if (!is_resource($this->_resource)) {
            return false;
        }
        return curl_exec($this->_resource);
    }

Usage Example

Пример #1
0
 public function testWriteAndRead()
 {
     $stream = new Curl($this->_testConfig);
     $this->assertTrue(is_resource($stream->open()));
     $this->assertTrue(is_resource($stream->resource()));
     $this->assertEqual(1, $stream->write());
     $this->assertPattern("/^HTTP/", (string) $stream->read());
 }
All Usage Examples Of lithium\net\socket\Curl::read