Download the PHP package f-oris/easy-sdk without Composer

On this page you can find all versions of the php package f-oris/easy-sdk. 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 easy-sdk

Easy sdk

一个快速构建PHP版本SDK的解决方案

Build Status

环境要求

基本使用

1. 安装easy-sdk-installer

通过composer进行全局安装,如下

注意需要将 ~/.composer/vendor/bin 目录设置到 PATH 环境变量中,否则无法识别第二步中的 easy-sdk 命令

2. 创建Sdk应用

执行Sdk初始化创建命令

按照命令行提示,依次输入以下包名、介绍、作者、根命名空间,easy-sdk指令会读取当前目录信息以及Git认证信息生成默认SDK应用信息,如不需要调整,直接回车确认即可

3. Sdk组件开发

进入sdk-demo目录,执行命令创建组件

命令执行完毕后,即可在src目录内可以看到Hello子目录,子目录内包含一个Hello.php文件,这个文件内只是一个空的组件类,我们需要根据业务完善相关业务代码。以输出一句“Hello, easy sdk framework.”为例,代码片段如下

4. Sdk组件测试

tests下新建Hello文件夹,新建HelloTest.php测试类,需要继承基类tests/TestCase.php,按照常规的phpunit进行测试即可,如下

5. 发布Sdk代码包

功能测试完毕后,按照packagist组件包发布指引,发布Sdk代码包,待composer仓库同步完毕后,即可通过composer拉取sdk组件代码包进行使用

使用扩展包扩展系统功能

Easy-sdk只是一个简单的Sdk应用框架,主要用于Sdk应用的组件管理,本身并不提供太多复杂功能,可通过引入外部组件扩展包来丰富Sdk应用的基础功能服务,以较为常用的Http服务为例,为Sdk应用引入Http功能组件。

1. 引入功能组件包

进入sdk-demo目录,通过composer引入http组件包

2. 发布Http组件配置文件

进入sdk-demo目录,执行artisan命令

命令执行完毕后,即可在项目目录内config文件下找到http-client.php配置文件

3. 使用Http组件服务

每一个Sdk组件都是通过Application获取到相应的组件实例才能进行调用相应的组件功能方法,获取Http组件的方式实例如下:

由于组件的生命周期其实是包含在Application的生命周期里面的,所以,在组件中就不能以上述方式进行调用,组件的调用方式如下:

另外,eask-sdk-httpclient扩展包提供了一个HasHttpClient的Trait类,开发人员可以在src/Component.php文件中引入并使用该类,简化之后的Http组件调用方式如下

Http组件扩展包提供具体功能参考f-oris/easy-sdk-httpclient扩展包说明

4. 扩展包列表

  1. easy-sdk-logger Logger组件包
  2. easy-sdk-httpclient HttpClient组件包
  3. easy-sdk-cache Cache组件包
  4. easy-sdk-develop Easy-sdk开发辅助扩展包

License

MIT License

Copyright (c) 2019-present F.oris [email protected]


All versions of easy-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
f-oris/easy-sdk-framework Version ^2.0
f-oris/easy-sdk-logger Version ^2.0
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 f-oris/easy-sdk contains the following files

Loading the files please wait ....