Elastica\Connection::hasConfig PHP Method

hasConfig() public method

public hasConfig ( string $key ) : boolean
$key string
return boolean
    public function hasConfig($key)
    {
        $config = $this->getConfig();
        return isset($config[$key]);
    }

Usage Example

Example #1
0
 /**
  * @group unit
  */
 public function testGetConfig()
 {
     $url = 'test';
     $connection = new Connection(array('config' => array('url' => $url)));
     $this->assertTrue($connection->hasConfig('url'));
     $this->assertEquals($url, $connection->getConfig('url'));
 }
All Usage Examples Of Elastica\Connection::hasConfig