daviddlv / clarifai-bundle
为您的 Symfony2 项目使用 Clarifai 进行图像识别
1.0
2016-10-31 21:57 UTC
Requires
- guzzlehttp/guzzle: ~6.0
- sainsburys/guzzle-oauth2-plugin: ~3.0
- symfony/framework-bundle: ~2.3|~3.0
This package is not auto-updated.
Last update: 2024-09-15 00:52:10 UTC
README
本包提供与 Clarifai 的集成,用于 Symfony2。
安装
步骤 1: 下载包
打开命令行,进入您的项目目录,然后执行以下命令以下载此包的最新稳定版本
$ composer require daviddlv/clarifai-bundle
步骤 2: 启用包
然后,通过将其添加到项目中 app/AppKernel.php
文件中注册的包列表中,来启用该包
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new ClarifaiBundle\ClarifaiBundle(), ); // ... } // ... }
配置
# app/config/config.yml clarifai: auth: client_id: %client_id% client_secret: %client_secret%
基本用法
$client = $this->conrainer->get('clarifai.api.client'); TODO