Skip to content

Commit

Permalink
fix issue on Elastic Collection
Browse files Browse the repository at this point in the history
  • Loading branch information
honarkhah committed Apr 30, 2017
1 parent 16f3043 commit 89fdd3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/Fadion/Bouncy/BouncyTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ public static function search(Array $body)
$params['body'] = $body;

$response = $instance->getElasticClient()->search($params);

return new ElasticCollection($response, $instance);
$collection = new ElasticCollection();
$collection->init($response, $instance);
return $collection;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Fadion/Bouncy/ElasticCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ElasticCollection extends Collection {
* @param array $response
* @param $instance
*/
public function __construct($response, $instance)
public function init($response, $instance)
{
$this->response = $response;
$this->instance = $instance;
Expand Down

0 comments on commit 89fdd3e

Please sign in to comment.