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'])); }
public function __construct() { $appId = '**************'; $restApiKey = '**************'; $masterKey = '**************'; // initialize parse ParseClient::initialize($appId, $restApiKey, $masterKey); // set session storage ParseClient::setStorage(new ParseSessionStorage()); }
/** * 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']); }); }
<?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(); } }
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'])); }
public function __construct() { session_start(); ParseClient::initialize('QPFTtheMPSYYm4mOuVXme3Ta49DE0l2jFIyT3zzI', 'eKqJ5BZrp1N9jafT28JphRlvVKO05Az1aNWLN5XU', 'PNKKkWglhjvgYQnpIiShd37kL7t7nhbVMS7Swhpa'); ParseClient::setStorage(new ParseSessionStorage()); }
<?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']);