当前位置: 首页>>代码示例>>PHP>>正文


PHP ParseClient::setStorage方法代码示例

本文整理汇总了PHP中Parse\ParseClient::setStorage方法的典型用法代码示例。如果您正苦于以下问题:PHP ParseClient::setStorage方法的具体用法?PHP ParseClient::setStorage怎么用?PHP ParseClient::setStorage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Parse\ParseClient的用法示例。


在下文中一共展示了ParseClient::setStorage方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: bootParseClient

 private function bootParseClient()
 {
     $config = $this->app['config']->get('parse');
     // Init the parse client
     ParseClient::initialize($config['app_id'], $config['rest_key'], $config['master_key']);
     ParseClient::setStorage(new ParseSessionStorage($this->app['session']));
 }
开发者ID:khangaikh,项目名称:golocal,代码行数:7,代码来源:ParseServiceProvider.php

示例2: __construct

 public function __construct()
 {
     $appId = '**************';
     $restApiKey = '**************';
     $masterKey = '**************';
     // initialize parse
     ParseClient::initialize($appId, $restApiKey, $masterKey);
     // set session storage
     ParseClient::setStorage(new ParseSessionStorage());
 }
开发者ID:alamops,项目名称:codeigniter-parse-library,代码行数:10,代码来源:parse.php

示例3: setupParse

 /**
  * Setup parse.
  *
  * @return void
  */
 protected function setupParse()
 {
     $config = $this->app->config->get('parse');
     ParseClient::setStorage(new SessionStorage());
     ParseClient::initialize($config['app_id'], $config['rest_key'], $config['master_key']);
     ParseClient::setServerURL($config['server_url'], $config['mount_path']);
     Auth::provider('parse', function ($app, array $config) {
         return new UserProvider($config['model']);
     });
     Auth::provider('parse-facebook', function ($app, array $config) {
         return new FacebookUserProvider($config['model']);
     });
     Auth::provider('parse-any', function ($app, array $config) {
         return new AnyUserProvider($config['model']);
     });
 }
开发者ID:parziphal,项目名称:parse,代码行数:21,代码来源:ParseServiceProvider.php

示例4: ParseSessionStorage

<?php

require 'vendor/autoload.php';
use Parse\ParseClient;
use Parse\ParseUser;
use Parse\ParseSessionStorage;
use Parse\ParseQuery;
use Parse\ParseObject;
ParseClient::initialize('bYE5q8xvJEiV2A2mtf0fgbQR8olNMQ2wfr05WYco', 'wZ5XfUCgQBZzFfQOwhWzP14W1fHfe6aj4qS76u0h', '3e8xtmuzrlpgAHNq7ho5Pe5tL9HrQFEgtJD2YVvQ');
if (session_status() == PHP_SESSION_NONE) {
    session_start();
}
ParseClient::setStorage(new ParseSessionStorage());
$currentUser = ParseUser::getCurrentUser();
$doubtsCourseQuery = new ParseQuery("doubtCourse");
$doubtsCourseQuery->equalTo("User", $currentUser);
$doubtsCourseQuery->equalTo("CourseName", $_GET["course"]);
echo $_GET["course"];
$doubtsCourse = $doubtsCourseQuery->find();
foreach ($doubtsCourse as $doubts) {
    $doubts->fetch();
    $doubts = $doubts->get("Doubts");
    foreach ($doubts as $doubt) {
        $doubt->set("Seen", 1);
        $doubt->save();
    }
}
开发者ID:TiagoRechau,项目名称:E-learning-for-elderly,代码行数:27,代码来源:doubtSeen.php

示例5: bootParseClient

 private function bootParseClient()
 {
     $config = $this->app['config']->get('parse');
     // Init the parse client
     ParseClient::initialize($config['app_id'], $config['rest_key'], $config['master_key']);
     if (empty($config['server_url']) != true && empty($config['mount_path'] != true)) {
         ParseClient::setServerURL($config['server_url'], $config['mount_path']);
     }
     ParseClient::setStorage(new ParseSessionStorage($this->app['session']));
 }
开发者ID:hipsterjazzbo,项目名称:laraparse,代码行数:10,代码来源:ParseServiceProvider.php

示例6: __construct

 public function __construct()
 {
     session_start();
     ParseClient::initialize('QPFTtheMPSYYm4mOuVXme3Ta49DE0l2jFIyT3zzI', 'eKqJ5BZrp1N9jafT28JphRlvVKO05Az1aNWLN5XU', 'PNKKkWglhjvgYQnpIiShd37kL7t7nhbVMS7Swhpa');
     ParseClient::setStorage(new ParseSessionStorage());
 }
开发者ID:jdc7894,项目名称:Parse-Practice,代码行数:6,代码来源:User.php

示例7: user_login

<?php

require 'js/parse/autoload.php';
require_once "common.php";
use Parse\ParseException;
use Parse\ParseUser;
use Parse\ParseSessionStorage;
use Parse\ParseClient;
$app_id = 'rVPT2Mws2ylIGYxH7pkxKsX0z0ORWDOoJebHe95f';
$rest_key = 'ULNpwIX1AfnGHEP0cRX6brWDVTjyzeLJnQCYx5uZ';
$master_key = 'Utp1QsroqE73YyXN42IgLubUhKe97XKqj5ciJ8iA';
ParseClient::initialize($app_id, $rest_key, $master_key);
$storage = new ParseSessionStorage();
ParseClient::setStorage($storage);
echo user_login($_POST['username'], $_POST['password']);
开发者ID:louk,项目名称:One-Nice-Thing,代码行数:15,代码来源:login.php


注:本文中的Parse\ParseClient::setStorage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。