Elastica\Connection::hasCompression PHP Method

hasCompression() public method

public hasCompression ( ) : boolean
return boolean
    public function hasCompression()
    {
        return (bool) $this->hasParam('compression') ? $this->getParam('compression') : self::DEFAULT_COMPRESSION;
    }

Usage Example

Example #1
0
 /**
  * @group unit
  */
 public function testCompression()
 {
     $connection = new Connection();
     $this->assertFalse($connection->hasCompression());
     $connection->setCompression(true);
     $this->assertTrue($connection->hasCompression());
 }