docroms/cnc-bundle

Symfony Bundle 用于集成 CNC 电影

安装: 22

依赖: 0

建议者: 0

安全性: 0

星标: 0

关注者: 2

分支: 0

类型:symfony-bundle

dev-master 2016-11-10 00:37 UTC

This package is not auto-updated.

Last update: 2024-09-14 20:04:01 UTC


README

此 Bundle 帮助开发者将电影集成到 CNC。

如何安装?

composer.json

添加以下行
"docroms/cnc-bundle": "dev-master",

config.json

添加以下行
cnc
    mode: recette # 或 production
    production_oauth_url: http://vad.cnc.fr
    production_consumer_key: YourProductionConsumerKey
    production_consumer_secret: YourProductionConsumerSecret
    production_access_token: YourProductionAccessToken
    production_access_token_secret : YourProductionAccessTokenSecret
    recette_oauth_url: http://int-cncvod.integra.fr
    recette_consumer_key: YourRecetteConsumerKey
    recette_consumer_secret: YourRecetteConsumerSecret
    recette_access_token: YourRecetteAccessToken
    recette_access_token_secret : YourRecetteAccessTokenSecret

AppKernel.php

在 Bundles 数组中添加以下行
new \docroms\CncBundle\CncBundle()

如何使用它?

在您的控制器中

您可以直接获取对象(用于将所有电影发送到 CNC),如下所示
    $editor = $this->get('cnc')
    ->getNewOeuvresByEditor();


然后,您可以这样发送对象以将电影列表发送到 CNC
    $result = $this->get('cnc')
    ->SendToCnc($editor);


之后,您可以从 CNC 获取电影列表,如下所示
    $result = $this->get('cnc')
    ->GetFromCnc($editor);