Skip to content

Commit b97895d

Browse files
committed
Bug fix highlight & _meta
1 parent 849f780 commit b97895d

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/Eloquent/DynamicIndex.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function __construct()
2323
public function setSuffix(?string $suffix): self
2424
{
2525
$this->options()->add('suffix', $suffix);
26-
$this->meta->setTableSuffix($suffix);
26+
$this->_meta->setTableSuffix($suffix);
2727

2828
return $this;
2929
}

src/Eloquent/ElasticsearchModel.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ trait ElasticsearchModel
2828
{
2929
use HasOptions, HybridRelations, ModelDocs;
3030

31-
protected ?ModelMeta $meta;
31+
protected ?ModelMeta $_meta;
3232

3333
protected ?Relation $parentRelation;
3434

@@ -66,12 +66,12 @@ trait ElasticsearchModel
6666

6767
public function getMeta(): ModelMeta
6868
{
69-
return $this->meta;
69+
return $this->_meta;
7070
}
7171

7272
public function getMetaAsArray(): array
7373
{
74-
return $this->meta->toArray();
74+
return $this->_meta->toArray();
7575
}
7676

7777
// ----------------------------------------------------------------------
@@ -171,7 +171,7 @@ public function newFromBuilder($attributes = [], $connection = null)
171171
unset($attributes['_meta']);
172172
}
173173
$model = parent::newFromBuilder($attributes, $connection);
174-
$model->meta->setMeta($meta);
174+
$model->_meta->setMeta($meta);
175175

176176
return $model;
177177
}
@@ -194,13 +194,13 @@ public function freshTimestamp(): string
194194

195195
public function getFullTable()
196196
{
197-
return $this->meta->getFullTable();
197+
return $this->_meta->getFullTable();
198198
}
199199

200200
public function setTable($table): static
201201
{
202202
$this->table = $table;
203-
$this->meta->setTable($table);
203+
$this->_meta->setTable($table);
204204

205205
return $this;
206206
}

src/Eloquent/Model.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct(array $attributes = [])
2727
$this->attributes['id'] = $this->newUniqueId();
2828
}
2929
$connection = $this->getConnection();
30-
$this->meta = new ModelMeta($this->getTable(), $connection->getTablePrefix());
30+
$this->_meta = new ModelMeta($this->getTable(), $connection->getTablePrefix());
3131
if (! $this->defaultLimit) {
3232
$this->defaultLimit = $connection->getDefaultLimit();
3333
}

src/Query/Builder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1988,7 +1988,7 @@ public function push($column, $value = null, $unique = false)
19881988
*
19891989
* @param string|string[] $columns
19901990
*/
1991-
public function highlight($columns = [], $preTag = '<em>', $postTag = '</em>', array $options = []): self
1991+
public function highlight($columns = ['*'], $preTag = '<em>', $postTag = '</em>', array $options = []): self
19921992
{
19931993
$column = Arr::wrap($columns);
19941994

0 commit comments

Comments
 (0)