@param string $capture

@return self
518028
public function setCapture($capture)
    {
        switch ($capture) {
            case 'c':
                $this->capture = 'c';
                break;
            case 'a':
                $this->capture = 'a';
                break;
            default:
                $this->capture = 'p';
                break;
        }

        return $this;
    }
832569
public static function create(string $environment): self
    {
        $environment = \strtolower($environment);

        self::validateEnvironment($environment);

        return new self($environment);
    }
241195
public function capture(CaptureInput $captureInput)
    {
        $capture = new Capture();
        $capture->captureInput = $captureInput;

        return $this->callSoapMethod('capture', $capture);
    }
664008
public function take($limit)
    {
        if (is_null($this->limit)) {
            $this->limit = (int) $limit;

            return $this;
        }

        if (preg_match('/^([\d]+),\s$/', $this->limit, $match)) {
            $this->limit = end($match).', '.$limit;
        }

        return $this;
    }
586913
public function orHavingRaw(string $condition): self
    {
        $this->condition->orHaving([new RawExp($condition)]);

        return $this;
    }
407858
public function take(int $count): Observable
    {
        if ($count === 0) {
            return self::empty();
        }

        return $this->lift(function () use ($count) {
            return new TakeOperator($count);
        });
    }
233119
public function withExtension(string $extension): self
    {
        if ($this->extension === $extension) {
            return $this;
        }

        $clone = clone $this;
        $clone->extension = strtolower($extension);

        return $clone;
    }
840819
public function distinct(string $field) : self
    {
        $this->query['type']     = Query::TYPE_DISTINCT;
        $this->query['distinct'] = $field;
        return $this;
    }
717427
public function setLocation($location): self
    {
        if ($location instanceof LocationResponse) {
            $this->setLocationResponse($location);

            return $this;
        }

        if ($location instanceof StopLocationResponse) {
            $this->setStopResponse($location);

            return $this;
        }

        if (\is_int($location) || \is_string($location)) {
            $this->setLocationId($location);

            return $this;
        }

        throw new \InvalidArgumentException(
            'The location must be either a LocationResponse object, StopLocationResponse object, string or integer'
        );
    }
1056895
private function operator(string $operator, $expression) : self
    {
        if ($this->currentField) {
            $this->expr[$this->currentField][$operator] = $this->ensureArray($expression);
        } else {
            $this->expr[$operator] = $this->ensureArray($expression);
        }

        return $this;
    }
398142
public function tags($tags): self
    {
        $tags = (array) $tags;

        $tags = array_merge($this->tags, $tags);

        $this->tags = array_unique($tags);

        return $this;
    }
230046
public function without($enumerator): self
    {
        $clone = clone $this;
        $clone->{$this->fnDoUnsetBit}(($this->enumeration)::get($enumerator)->getOrdinal());
        return $clone;
    }
63601
public function setFieldOperator(string $field, string $operator = self::OPERATOR_OR): self
    {
        return $this->setFieldParam($field, 'operator', $operator);
    }
1187768
public function outputEncoding(string $encoding): self
    {
        $encoding = $this->filterEncoding($encoding);
        if ($encoding === $this->output_encoding) {
            return $this;
        }

        $clone = clone $this;
        $clone->output_encoding = $encoding;

        return $clone;
    }
1282666
public function without($key): self
    {
        if (!$this->has($key)) {
            return $this;
        }

        $clone = clone $this;
        unset($clone->keys[$key]);

        return $clone;
    }
135090
public function from($values): self
    {
        if (!empty($values)) {
            $this->properties['from'] = collect($values)->map(function ($value) {
                return trim($value);
            })->all();
        }

        return $this;
    }
751310
public function unserialize($subscription): self
    {
        $data = json_decode($subscription, true);

        $this->operationName = $data['operation_name'];
        $this->channel = $data['channel'];
        $this->args = $data['args'];
        $this->context = $this->contextSerializer()->unserialize(
            $data['context']
        );
        $this->query = AST::fromArray(
            unserialize($data['query'])
        );

        return $this;
    }