Download the PHP package leancloud/leancloud-sdk without Composer

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

LeanCloud PHP SDK

Build Status Latest Version Coverage Status

LeanCloud 为应用提供了从数据存储,消息推送,实时通信到离线分析等全方位 的一站式云端服务,帮助应用开发者降低后端开发及维护成本,为应用开发加速。 PHP SDK 提供了对数据存储,用户管理等模块的 PHP 实现及接口,以方便 PHP 应用的开发。

安装

运行环境要求 PHP 5.6 及以上版本,以及 cURL

composer 安装

如果使用标准的包管理器 composer,你可以很容易的在项目中添加依赖并下载:

手动下载安装

你也可以前往发布页面 手动下载安装包。假设你的应用位于 $APP_ROOT 目录下:

初始化

完成上述安装后,需要对 SDK 初始化。如果已经创建应用,可以在 LeanCloud [控制台 > 应用设置]里找到应用的 ID 和 key。然后在项目中加载 SDK, 并初始化:

使用示例

用户注册及管理

注册一个用户:

登录一个用户:

对象存储

我们同样支持子类继承,子类中需要定义静态变量 $className ,并注册到存储类:

对象查询

给定一个 objectId,可以如下获取对象。

更为复杂的条件查询:

文件存储

直接创建文件:

由本地文件创建:

由已知的 URL 创建文件:

更多文档请参考 PHP 数据存储开发指南

贡献

See Hacking.md if you'd like to contribute.


All versions of leancloud-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
ext-curl Version *
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 leancloud/leancloud-sdk contains the following files

Loading the files please wait ....