Pop\Curl\Curl::getFields PHP Method

getFields() public method

Get all field
public getFields ( ) : array
return array
    public function getFields()
    {
        return $this->fields;
    }

Usage Example

Beispiel #1
0
 public function testSetAndGetFields()
 {
     $c = new Curl('http://www.popphp.org/version', array(CURLOPT_HEADER => false, CURLOPT_RETURNTRANSFER => true));
     $c->setFields(array('name' => 'Test'));
     $c->setField('email', '*****@*****.**');
     $this->assertEquals('Test', $c->getField('name'));
     $this->assertEquals(2, count($c->getFields()));
 }