Download the PHP package srustamov/gcore-php without Composer

On this page you can find all versions of the php package srustamov/gcore-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package gcore-php

Gcore Php Package

PHP client for the Gcore API.

Gcore publishes an official Python SDK but no PHP one. This package covers CDN, DNS and FastEdge. The API surface is generated from Gcore's published OpenAPI specifications; the transport, retry, and hydration layers are hand-written.

Requirements

Installation

Getting started

The API key falls back to the GCORE_API_KEY environment variable when the argument is omitted.

Pagination

List endpoints return a lazy Paginator. Iterating it walks every page, so you never deal with offsets yourself.

Pagination is driven through the returned object, not through the call that creates it:

Filters, on the other hand, are arguments. Array filters repeat the query key, which is what the API expects:

Working with records

Request bodies are associative arrays. Their shapes are documented as array{...} PHPDoc on each method, so PhpStorm and PHPStan can check them without the library shipping a parameter class per endpoint.

Undocumented fields

Models expose typed properties for everything the specification documents, and raw() for everything else. A field Gcore adds after this release is still reachable without waiting for a new version.

toArray() and jsonSerialize() return the same raw payload, so a model round-trips exactly what the server sent.

Error handling

Every failure is a Gcore\Exception\GcoreException. Non-2xx responses raise a subclass of ApiException chosen by status code.

Status Exception
400 BadRequestException
401 AuthenticationException
403 PermissionDeniedException
404 NotFoundException
409 ConflictException
422 UnprocessableEntityException
429 RateLimitException
5xx ServerException
network, timeout ConnectionException

The three Gcore products in scope document no shared error body, so the message is taken from whichever of message, error, detail, or errors is present, falling back to the HTTP reason phrase. rawBody is always kept.

Configuration

Requests retry on 408, 409, 429, and 5xx responses, and on connection errors, with exponential backoff plus jitter capped at 8 seconds. A numeric Retry-After header wins over the computed delay. Any single call can override the defaults:

Coverage

Product Resources Models Accessor
CDN 18 220 $gcore->cdn
DNS 10 50 $gcore->dns
FastEdge 7 30 $gcore->fastedge
Cloud — — Not planned for v1

Development

This section is for working in the repository. The generator is not part of the installed package — composer require ships src/ and nothing else.

src/Cdn, src/Dns and src/Fastedge are generated. Do not edit them by hand — change the emitters under codegen/ and regenerate:

Formatting is a required step, not a tidy-up: the emitters produce output that php-cs-fixer then normalizes, so the zero-diff check below only holds once it has run.

Where the naming rules cannot produce a good name — CDN puts three separate collections under one Logs uploader tag, for instance — codegen/overrides.php maps the path to the name it should have.

Regenerating an unchanged specification produces no diff, and CI enforces that, so a hand-edit under a generated directory fails the build rather than being silently erased by the next run.

php codegen/bin/check-drift.php reports when a vendored specification has fallen behind the published one.

License

MIT


All versions of gcore-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
guzzlehttp/guzzle Version ^7.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package srustamov/gcore-php contains the following files

Loading the files please wait ...