@param string      $endpoint
@param string|null $where
@param bool        $strictMode

@throws \Exception
8288
private function createSnapshot(string $endpoint, ?string $where = null, $strictMode = false): void
    {
        if ($this->endpoints && !\in_array($endpoint, $this->endpoints)) {
            if (DefinitionRegistry::DEFAULT_ENDPOINT === $endpoint) {
                throw new \Exception('Must specify a valid endpoint name or use the `--all` option');
            }

            throw new \Exception(
                sprintf('The are no valid endpoint called `%s`.', $endpoint)
            );
        }

        $snapshot = $this->schemaSnapshot->createSnapshot($endpoint);
        file_put_contents(sprintf('%s/%s.snapshot.json', $where, $endpoint), json_encode($snapshot, JSON_PRETTY_PRINT));
        $this->updateFeatureFile($where, $endpoint, $strictMode);
    }
1169333
protected function endpoint($resId = null)
    {
        return $resId === null ? $this->endpoint : $this->endpoint . '/' . $resId;
    }
1067449
public static function ping(
        $endpoint,
        ClientInterface $client = null
    ) {
        AnnotationRegistry::registerLoader('class_exists');

        $afterpayClient = $client ?: new Client([ 'base_uri' => $endpoint ]);

        return new PingService($afterpayClient);
    }
766877
public static function request($endpoint)
  {
    return (new Request(NULL, NULL, NULL))->host($endpoint)->get()->path('')->accept('application/json');
  }
244905
public function getValue($endpoint, $key)
    {
        if (isset($this->endpoints['endpoints'][$endpoint])
            && isset($this->endpoints['endpoints'][$endpoint][$key])
        ) {
            return $this->endpoints['endpoints'][$endpoint][$key];
        }

        if (isset($this->endpoints[$key])) {
            return $this->endpoints[$key];
        }

        return null;
    }
1190350
public function scopeForModel($query, $model, $strict = false)
    {
        (new AbilitiesForModel)->constrain($query, $model, $strict);
    }
161078
function Endpoint(spec, resourcePath, method) {
  this.method = method;
  this.resourcePath = resourcePath || '/';
  this.spec = spec;
}
211695
public function setServiceEndpoint(string $endpoint): AbstractClientBuilder
    {
        if (!filter_var($endpoint, FILTER_VALIDATE_URL) || parse_url($endpoint, PHP_URL_SCHEME) !== 'https') {
            throw new \InvalidArgumentException('Incorrect endpoint given');
        }

        $this->endpoint = $endpoint;

        return $this;
    }
189354
private function setApiEndPoint($endPoint)
    {
        if (empty($this->host))
            throw new OdooException('You must provide the odoo host by host setter method');

        return $this->host . $this->suffix . $endPoint;

    }
913077
public function setEndpoint($endpoint = '')
    {
        $this->endpoint = $endpoint;
        $this->debug->info(__FUNCTION__, 'setEndpoint: ', $this->endpoint);

        return $this;
    }
1164958
public void addWhere(final String _where)
        throws EFapsException
    {
        if (_where != null) {
            final List<AbstractWhere> wheres = InvokerUtil.analyzeWheres(_where);
            QWhereSection whereSection = null;
            for (final AbstractWhere where : wheres) {
                final AbstractQPart part = QueryBuilder.getQPart(where);
                if (whereSection == null) {
                    whereSection = new QWhereSection(part);
                } else {
                    whereSection.setPart(new QAnd(whereSection.getPart(), part));
                }
            }
            this.selectPart.setWhereSection(whereSection);
        }
    }
589157
public static URI toUri(String endpoint, ClientConfiguration config) {

        if (config == null) {
            throw new IllegalArgumentException("ClientConfiguration cannot be null");
        }
        return toUri(endpoint, config.getProtocol());
    }
497818
public function isForPrivateZone(bool $strict = false)
    {
        if (!method_exists($this, 'getZone')) {
            throw new ENabuCoreException(ENabuCoreException::ERROR_FEATURE_NOT_IMPLEMENTED);
        }

        $zone = $this->getZone();

        return ($zone === CNabuSite::ZONE_PRIVATE || (!$strict && $zone === CNabuSite::ZONE_BOTH));
    }
947315
public static function getStatusBetween($from = null, $to = null, $strict = false, $strictTo = null)
    {
        $statusList = static::getStatusList();

        $strictFrom = $strict;
        $strictTo = isset($strictTo) ? (bool) $strictTo : $strict;

        // Remove status before given $from
        if (isset($from)) {
            static::checkAllowedStatus($from);
            foreach ($statusList as $key => $status) {
                if ($from !== $status) {
                    unset($statusList[$key]);
                } else {
                    if ($strictFrom) {
                        unset($statusList[$key]);
                    }
                    break;
                }
            }
        }

        // Remove status after given $to
        if (isset($to)) {
            static::checkAllowedStatus($to);
            // On inverse l'ordre des statuts
            $statusList = array_reverse($statusList);
            foreach ($statusList as $key => $status) {
                if ($to !== $status) {
                    unset($statusList[$key]);
                } else {
                    if ($strictTo) {
                        unset($statusList[$key]);
                    }
                    break;
                }
            }
            // On inverse l'ordre des statuts
            $statusList = array_reverse($statusList);
        }

        return array_values($statusList);
    }
1310507
protected function compile(Endpoint $endpoint): void
    {
        //run all extensions for each definition
        foreach ($this->plugins as $plugin) {
            //run extensions recursively in all types and fields
            foreach ($endpoint->allTypes() as $type) {
                $this->configureDefinition($plugin, $type, $endpoint);
                if ($type instanceof FieldsAwareDefinitionInterface) {
                    foreach ($type->getFields() as $field) {
                        $this->configureDefinition($plugin, $field, $endpoint);
                        foreach ($field->getArguments() as $argument) {
                            $this->configureDefinition($plugin, $argument, $endpoint);
                        }
                    }
                }
            }

            //run extension in all queries
            foreach ($endpoint->allQueries() as $query) {
                $this->configureDefinition($plugin, $query, $endpoint);
                foreach ($query->getArguments() as $argument) {
                    $this->configureDefinition($plugin, $argument, $endpoint);
                }
            }

            //run extensions in all mutations
            foreach ($endpoint->allMutations() as $mutation) {
                $this->configureDefinition($plugin, $mutation, $endpoint);
                foreach ($mutation->getArguments() as $argument) {
                    $this->configureDefinition($plugin, $argument, $endpoint);
                }
            }

            //run extensions in all subscriptions
            foreach ($endpoint->allSubscriptions() as $subscription) {
                $this->configureDefinition($plugin, $subscription, $endpoint);
                foreach ($subscription->getArguments() as $argument) {
                    $this->configureDefinition($plugin, $argument, $endpoint);
                }
            }

            $plugin->configureEndpoint($endpoint);
        }
    }
460480
protected function post($endpoint, $params = [], $accessToken = null)
    {
        return $this->sendRequest(self::POST_METHOD, $endpoint, $params, $accessToken);
    }
353579
private void setWhere(Where where) throws SqlParseException {
		if (where != null) {
			BoolQueryBuilder boolQuery = QueryMaker.explan(where,this.select.isQuery);
			request.setQuery(boolQuery);
		}
	}