当前位置: 首页>>代码示例>>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;未经允许,请勿转载。