承接 wethinkright/google-cloud-silex 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wethinkright/google-cloud-silex

Composer 安装命令:

composer require wethinkright/google-cloud-silex

包简介

A Silex Service Provider for Google Cloud PHP

README 文档

README

Build Status codecov

This package makes integrating Google Cloud PHP into your Silex application quick and easy.

Installation

$ composer require wethinkright/google-cloud-silex

Usage

To learn how ServiceProviders work and how they can be loaded in your application, refer to the Silex Documentation.

<?php

use Silex\Application;
use WeThinkRight\GoogleCloudSilex\GoogleCloudProvider;

$app = new Application;
$app->register(new GoogleCloudProvider(), [
    'cloud.config' => [
        'keyFilePath' => '/path/to/service/account/credentials.json'
    ]
]);

$pubsub = $app['cloud']->pubsub();

Services

Services are provided for your convenience for each of the Google Cloud PHP APIs.

$bigquery = $app['cloud.bigquery'];
$datastore = $app['cloud.datastore'];
$logging = $app['cloud.logging'];
$language = $app['cloud.language'];
$pubsub = $app['cloud.pubsub'];
$speech = $app['cloud.speech'];
$storage = $app['cloud.storage'];
$translate = $app['cloud.translate'];
$vision = $app['cloud.vision'];

Configuration

To learn how to configure Google Cloud PHP, refer to the Google\Cloud\ServiceBuilder::__construct() documentation.

  • The configuration array can be provided when registering the Service Provider:
<?php

use Silex\Application;
use WeThinkRight\GoogleCloudSilex\GoogleCloudProvider;

$app = new Application;
$app->register(new GoogleCloudProvider(), [
    'cloud.config' => [
        'keyFilePath' => '/path/to/service/account/credentials.json'
    ]
]);
  • Or, it can be assigned prior to registering the Service Provider:
<?php

use Silex\Application;
use WeThinkRight\GoogleCloudSilex\GoogleCloudProvider;

$app = new Application;

$app['cloud.config'] = [
    'keyFilePath' => '/path/to/service/account/credentials.json'
];

$app->register(new GoogleCloudProvider());

License

This package is licensed under the Apache 2.0 software license. See LICENSE for more information.

统计信息

  • 总下载量: 1.63k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache
  • 更新时间: 2016-11-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固