ncmbmania/php-ncmb
Composer 安装命令:
composer require ncmbmania/php-ncmb
包简介
PHP SDK for NIFCLOUD mobile backend (NCMB)
README 文档
README
php-ncmb: Unofficial PHP SDK for NIFCLOUD mobile backend (NCMB).
Install
Add line into 'require' section of your 'composer.json':
"ncmbmania/php-ncmb": "*"
then hit command:
$ composer install
Initialize
use Ncmb\NCMB; $appkey = YOUR_APPLICATION_KEY; $clientkey = YOUR_CLIENT_KEY; NCMB::initialize($appkey, $clientkey);
Store data
use Ncmb\Object; use NCMB\GeoPoint; $className = 'FooBar'; $foobar = new Object($className); $foobar->stringKey = 'This is String'; $foobar->intKey = 1; $foobar->dateKey = new DateTime(); $foobar->geoKey = new GeoPoint(43.223, 133.392); $foobar->save();
Find data
use \Ncmb\Query; $className = 'FooBar'; $query = new Query($className); $query->equalTo('intKey', 1); $foundObj = $query->first();
File
use \Ncmb\File; // put file $file = File::createFromData('hogehoge', 'hoge.txt'); $file->save(); // get file $file = File::createFromServer('hoge.txt'); $data = $file->getData();
Script
use \Ncmb\Script; $result = Script::execute('hello.js', ['query' => ['name' => 'NCMB']]);
LICENSE
MIT LICENSE. see also LICENSE file.
统计信息
- 总下载量: 540
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-30