當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。