first commit

This commit is contained in:
Sven Wappler
2021-04-24 04:44:44 +02:00
parent cadcc8edb4
commit 2c9e27b3b7
55 changed files with 333 additions and 3877 deletions

View File

@@ -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);
}
/**