daviddlv/clarifai-bundle

为您的 Symfony2 项目使用 Clarifai 进行图像识别

安装: 23

依赖关系: 0

建议者: 0

安全性: 0

星标: 0

关注者: 2

分支: 0

开放性问题: 0

类型:symfony-bundle

1.0 2016-10-31 21:57 UTC

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