first commit
This commit is contained in:
@@ -15,14 +15,13 @@ namespace WapplerSystems\Meilisearch\System\Meilisearch\Document;
|
||||
*/
|
||||
|
||||
use RuntimeException;
|
||||
use Solarium\QueryType\Update\Query\Document as SolariumDocument;
|
||||
|
||||
/**
|
||||
* Document representing the update query document
|
||||
*
|
||||
* @author Timo Hund <timo.hund@dkd.de>
|
||||
*/
|
||||
class Document extends SolariumDocument
|
||||
class Document
|
||||
{
|
||||
/**
|
||||
* Magic call method used to emulate getters as used by the template engine.
|
||||
@@ -33,13 +32,12 @@ class Document extends SolariumDocument
|
||||
*/
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
if (substr($name, 0, 3) == 'get') {
|
||||
if (substr($name, 0, 3) === 'get') {
|
||||
$field = substr($name, 3);
|
||||
$field = strtolower($field[0]) . substr($field, 1);
|
||||
return $this->fields[$field] ?? null;
|
||||
} else {
|
||||
throw new RuntimeException('Call to undefined method. Supports magic getters only.', 1311006605);
|
||||
}
|
||||
throw new RuntimeException('Call to undefined method. Supports magic getters only.', 1311006605);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user