當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ParseClient::initialize方法代碼示例

本文整理匯總了PHP中Parse\ParseClient::initialize方法的典型用法代碼示例。如果您正苦於以下問題:PHP ParseClient::initialize方法的具體用法?PHP ParseClient::initialize怎麽用?PHP ParseClient::initialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Parse\ParseClient的用法示例。


在下文中一共展示了ParseClient::initialize方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Construct our adapter by gleaning the keys from the ENV params.
  * These can be set in the .env file, or set as environment vars on a production server.
  */
 public function __construct()
 {
     $app_id = env('PARSE_APP_APID');
     $rest_key = env('PARSE_APP_REST');
     $master_key = env('PARSE_APP_MAST');
     ParseClient::initialize($app_id, $rest_key, $master_key);
 }
開發者ID:srleach,項目名稱:pushr,代碼行數:11,代碼來源:ParsePushNotificationAdapter.php

示例2: __construct

 /**
  * Initialize Push with needed Parse keys
  *
  * @param $appId
  * @param $restKey
  * @param $masterKey
  */
 public function __construct($appId, $restKey, $masterKey)
 {
     $this->appId = $appId;
     $this->restKey = $restKey;
     $this->masterKey = $masterKey;
     ParseClient::initialize($appId, $restKey, $masterKey);
 }
開發者ID:gpaton,項目名稱:parse-bundle,代碼行數:14,代碼來源:Push.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->database();
     //         Init parse: app_id, rest_key, master_key
     ParseClient::initialize($this->config->item('app_id'), $this->config->item('rest_key'), $this->config->item('master_key'));
 }
開發者ID:anhvult911,項目名稱:track,代碼行數:7,代碼來源:track.php

示例4: setUp

 public static function setUp()
 {
     ini_set('error_reporting', E_ALL);
     ini_set('display_errors', 1);
     date_default_timezone_set('UTC');
     ParseClient::initialize('app-id-here', 'rest-api-key-here', 'master-key-here');
 }
開發者ID:louk,項目名稱:One-Nice-Thing,代碼行數:7,代碼來源:ParseTestHelper.php

示例5: inicializa

 /**
  * Inicializa la aplicacion de la base de datos de Parse
  */
 public static function inicializa()
 {
     try {
         ParseClient::initialize('ve3SsAciKVt8GwhmLDCzW9rQ6EkPj8ai3pWcp3Is', 'zt0dVKAQwyRTAOFkfFj5d9jzDWAH9fjaJsUR5fhD', 'QpnJBJkOEp3VmEbcaAX8r6HDixj2wCUNQ42e1c4N');
     } catch (ParseException $ex) {
     }
 }
開發者ID:sterben93,項目名稱:casa,代碼行數:10,代碼來源:APIInmueble.php

示例6: onBootstrap

 public function onBootstrap(MvcEvent $e)
 {
     //parse uses a global client, and needs the session to be started
     $config = $e->getApplication()->getServiceManager()->get('config');
     session_start();
     ParseClient::initialize($config['parse']['app_id'], $config['parse']['rest_key'], $config['parse']['master_key']);
 }
開發者ID:mkhuramj,項目名稱:ToDo-Web,代碼行數:7,代碼來源:Module.php

示例7: testQuery

 public function testQuery()
 {
     $app_id = "XASVlMZE1IVe3zCDpHT5mzhTiEd3su7IWM68Uepa";
     $rest_key = "zBwmJIkcOE1dvX3GUIpJT5ebLOhhPhn1NmsdWC6e";
     $master_key = "0zNVL0uJnxUiU9r1Ogvii7vLW8tOASIyS5j5HK4G";
     ParseClient::$HOST_NAME = "http://localhost/parse/public/";
     ParseClient::initialize($app_id, $rest_key, $master_key);
     \App\Test::truncate();
     $response = $this->generalQuery();
     $this->assertArrayHasKey("results", $response);
     $this->assertEmpty($response["results"]);
     $this->objects = factory(\App\Test::class, 50)->create();
     $response = $this->generalQuery();
     $this->assertArrayHasKey("results", $response);
     $this->assertEquals(50, count($response["results"]));
     $response = $this->firstQuery();
     $this->assertArrayHasKey("results", $response);
     $this->assertEquals(1, count($response["results"]));
     $response = $this->equalToQuery();
     $this->assertArrayHasKey("results", $response);
     $this->assertEquals(1, count($response["results"]));
     $response = $this->notEqualToQuery();
     $this->assertArrayHasKey("results", $response);
     $this->assertEquals(49, count($response["results"]));
     $response = $this->limitQuery();
     $this->assertArrayHasKey("results", $response);
     $this->assertEquals(10, count($response["results"]));
 }
開發者ID:nidalb,項目名稱:baas,代碼行數:28,代碼來源:ExampleTest.php

示例8: 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

示例9: __construct

 public function __construct()
 {
     $app_id = "id";
     $rest_key = "rest_key";
     $master_key = "master_key";
     ParseClient::initialize($app_id, $rest_key, $master_key);
 }
開發者ID:malimu,項目名稱:baas,代碼行數:7,代碼來源:TodoController.php

示例10: setupParse

 /**
  * Setup parse.
  *
  * @param \Illuminate\Contracts\Foundation\Application $app
  *
  * @return void
  */
 protected function setupParse(Application $app)
 {
     $app_id = env('PARSE_APP_ID');
     $rest_key = env('PARSE_REST_KEY');
     $master_key = env('PARSE_MASTER_KEY');
     ParseClient::initialize($app_id, $rest_key, $master_key);
 }
開發者ID:redenz,項目名稱:Laravel-Parse,代碼行數:14,代碼來源:ParseServiceProvider.php

示例11: setUp

 public static function setUp()
 {
     ini_set('error_reporting', E_ALL);
     ini_set('display_errors', 1);
     date_default_timezone_set('UTC');
     ParseClient::initialize('app-id-here', 'rest-api-key-here', 'master-key-here', true, 'account-key-here');
     ParseClient::setServerURL('http://localhost:1337/parse');
 }
開發者ID:ActiveWebsite,項目名稱:BoojPressPlugins,代碼行數:8,代碼來源:Helper.php

示例12: email

 public static function email($type, $email, $title = "")
 {
     ParseClient::initialize(self::$app_id, self::$rest_key, self::$master_key);
     $alert = ["Nuevas validaciones disponibles", "Tiene un nuevo evento disponible", "Nuevas encuestas disponibles", "Tiene un nuevo mensaje"];
     $query = ParseInstallation::query();
     $query->equalTo("email", $email);
     ParsePush::send(array("where" => $query, "data" => array("title" => "VaClases", "alert" => ($title ? $title . " - " : "") . $alert[$type])));
 }
開發者ID:netsti,項目名稱:vaclases,代碼行數:8,代碼來源:Push.php

示例13: connect_to_db

 public function connect_to_db()
 {
     //almacenamos en variables los datos obtenidos desde la clase Config
     $app_id = Config::appId;
     $rest_key = Config::restKey;
     $master_key = Config::masterKey;
     //establecemos la conexión a la DB
     $connection = ParseClient::initialize($app_id, $rest_key, $master_key);
 }
開發者ID:vorenusCoA,項目名稱:App_Asistencia,代碼行數:9,代碼來源:Connect.php

示例14: setUp

 public static function setUp()
 {
     $app_id = "8PYzxLlTqztkDEBCx3oDH6m6CqXYRpb4QTCWuuMw";
     $rest_key = "VUEHy9GWuE9SJdCn8wvScoWAMYWun6PbpzqP8KAh";
     $master_key = "WOyCyOO7gXaMs2wCqgwmBsWDxo8R7CIPhDH9baOM";
     ini_set('error_reporting', E_ALL);
     ini_set('display_errors', 1);
     date_default_timezone_set('UTC');
     ParseClient::initialize($app_id, $rest_key, $master_key);
 }
開發者ID:nidalb,項目名稱:baas,代碼行數:10,代碼來源:ParseTestHelper.php

示例15: 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


注:本文中的Parse\ParseClient::initialize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。