Download the PHP package jiechengyang/i-secure-center without Composer

On this page you can find all versions of the php package jiechengyang/i-secure-center. 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 i-secure-center

iSecureCenter

基于yii2开发的海康威视综合安防平台V1.3api接口组件,目前组件封装了资源接口和视频接口,后续打算把全部接口封装。

===============================

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock

安装

  1. 使用composer composer的安装以及国内镜像设置请点击此处

  2. 手动导入 下载i-secure-center包后放置在任意目录 然后在yii2 index.php中

关于组件

设计的想法:

接口实现的想法:

总结

通过第三、四个想法的结合,我发现了它的一些好处:

  1. 我们调用人家的接口总有些必须携带的参数,在接口类的每个方法都预先的做了预警操作,必要的参数外部调用未携带时,send会直接返回错误提示,而像分页参数、时间参数方法里也设置了默认值和时间格式转换,外部调用简单调用就可以了。而这样的想法和上面那位朋友也是不谋而合,因为我没细看他的代码,在我接口调用出现问题时,发现他的做法也是如此。
  2. 合理的使用yii2-http-client组件,我封装了http请求组件,因为我在init里面,写了before_send和after_send的两个事件。service调用只需把请求的地址,参数,验参的参数提供过去,具体怎么接口认证,那就是before_send的事了,最后返回的参数需要做一些变化,也是after_send做的了,service它只需发送了,把想要的数据给它就行了。 哈哈,yii2的思想真的很nice。
  3. baseApi代码和注释如下:

配置

i-secure-center是作为一个组件提供服务的,所以得配置yii2 iSecureCenter组件。打开common/config/main.php在components块内增加如下配置: 配置见config/main.php

http-client说明

yii2的http-client默认使用php的stream扩展,如果使用curl,则在实例化之后$client->setTransport("yii\httpclient\CurlTransport")即可。如果需要跳过ssl证书检测则->setOptions([ CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => false, ])

示例

见examples/demo.php

说明

要在github发布release才可以composer require,不然你只能用dev-master版本

yii2-iSecureCenter 集成了[https://open.hikvision.com] 常用接口,采用组件的形式主要为了实现参数可配置,事件化处理业务。

目前组件还在完善中....


All versions of i-secure-center with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
yiisoft/yii2 Version >=2.0.13
yiisoft/yii2-httpclient 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 jiechengyang/i-secure-center contains the following files

Loading the files please wait ....