public function shards($key = null)
    {
        $shards = $this->response['_shards'];

        if ($key and isset($shards[$key])) {
            return $shards[$key];
        }

        return $shards;
    }
public function shards($key = null)
    {
        $shards = $this->response['_shards'];

        if ($key and isset($shards[$key])) {
            return $shards[$key];
        }

        return $shards;
    }
public function shards ( $ key = null ) { $ shards = $ this -> response [ '_shards' ] ; if ( $ key and isset ( $ shards [ $ key ] ) ) { return $ shards [ $ key ] ; } return $ shards ; }
Shards information.

@param null|string $key
@return array|string
Shards information .