public function getConnection()
    {
        if ($this->connection === null) {
            $this->connection = ConnectionManager::get('auditlog_elastic');
        }

        return $this->connection;
    }
public function getConnection()
    {
        if ($this->connection === null) {
            $this->connection = ConnectionManager::get('auditlog_elastic');
        }

        return $this->connection;
    }
public function getConnection ( ) { if ( $ this -> connection === null ) { $ this -> connection = ConnectionManager :: get ( 'auditlog_elastic' ) ; } return $ this -> connection ; }
Gets the client connection to elastic search.

If connection is not defined, create a new one.

@return Elastica\Client
Gets the client connection to elastic search .