Skip to content
Snippets Groups Projects
Commit 63a15e3c authored by Simon Gadient's avatar Simon Gadient Committed by Simonas Šerlinskas
Browse files

Initialize static serializer on wakeup (#288)

* master branch dev versions set to 6.1-dev

* introducing field aware trait and named builder interface

* Adding param `track_total_hits` (#273)

* Add getQuery Method to FunctionScoreQuery (#271)

* Add getQuery Method to FunctionScoreQuery

Add getQuery Method to FunctionScoreQuery in order to apply changes to query of FunctionScoreQuery.

* Update FunctionScoreQuery.php

* added new NestedSort for replacing deprecated nested_filter and nested_path (#267)

* added new NestedSort for replacing deprecated nested_filter and nested_path

* made the filter optional

* remove keyed option condition for to have range key

* update readme version matrix

* fix php psr2 style issues in the FunctionScore class

* Initialize static serializer on wakeup
parent 06c553b0
No related branches found
No related tags found
No related merge requests found
...@@ -171,9 +171,25 @@ class Search ...@@ -171,9 +171,25 @@ class Search
private $endpoints = []; private $endpoints = [];
/** /**
* Initializes serializer. * Constructor to initialize static properties
*/ */
public function __construct() public function __construct()
{
$this->initializeSerializer();
}
/**
* Wakeup method to initialize static properties
*/
public function __wakeup()
{
$this->initializeSerializer();
}
/**
* Initializes the serializer
*/
private function initializeSerializer()
{ {
if (static::$serializer === null) { if (static::$serializer === null) {
static::$serializer = new OrderedSerializer( static::$serializer = new OrderedSerializer(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment