Google\Cloud\Datastore\Query\Query::kind PHP 메소드

kind() 공개 메소드

If empty, returns entities of all kinds. Must be set in order to filter results. While you may supply as many kinds as you wish, datastore currently only accepts one at a time. Example: $query->kind('Person');
public kind ( array | string $kinds ) : Query
$kinds array | string The kind or kinds to return. Only a single kind is currently supported.
리턴 Query
    public function kind($kinds)
    {
        if (!is_array($kinds)) {
            $kinds = [$kinds];
        }
        foreach ($kinds as $kind) {
            $this->query['kind'][] = $this->propertyName($kind);
        }
        return $this;
    }