Download the PHP package cblink-service/foundation without Composer

On this page you can find all versions of the php package cblink-service/foundation. 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 foundation

foundation-sdk

.

安装

使用

容器

Container 是整个项目的核心,继承了 Pimple\Container,也就是一个容器。你所使用的 $foundation->order $foundation->config $foundation->user 等等都是因为这个是一个容器。中含有一个 $providers 服务提供者的数组属性。

服务提供者

容器的最佳表现。接上面所说的,你可以在 Container 中注册多个服务提供者, 新建的服务提供者需要实现 Pimple\ServiceProviderInterface,并补充完 register 方法,其实就是 new 一个类在 容器中,参考这里

初始化

API

凡是写 SDK 都需要去新建一个 Api 的类,这个类需要去继承 Cblink\Service\Foundation\BaseApiCblink\Service\Foundation\BaseRequestApi

BaseApi类中默认包含了实现认证的中间件,需要先将access_token的服务提供者引入容器中,完成在 header 中增加 Authorization已达到完成认证的目的。参考这里 如SDK中提供的认证机制不满足使用,可以自行实现 access_token 类,只需要将类实现 Cblink\Service\Foundation\Contracts\AccessTokenInterface 中的方法即可

BaseRequestApi 通常用于无需认证的接口。

Contributing

You can contribute in one of three ways:

  1. File bug reports using the issue tracker.
  2. Answer questions or fix bugs on the issue tracker.
  3. Contribute new features or update the wiki.

The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.

License

MIT


All versions of foundation with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
pimple/pimple Version ^3.5
hyperf/guzzle Version ^3.0 || ^2.2
psr/simple-cache Version ^3.0 || ^1.0
symfony/cache Version ^6.0 || ^5.0 || ^4.3 || ^3.3
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 cblink-service/foundation contains the following files

Loading the files please wait ....