thesisplanet/zencoder

通过 Zend Framework (ZF2) 服务定位器加载 Zencoder 服务

dev-master 2014-02-04 17:16 UTC

This package is not auto-updated.

Last update: 2024-09-28 15:44:29 UTC


README

简介

通过 ZF2 服务定位器加载 Zencoder (Service_Zencoder)。

安装

  1. 在 composer.json 中添加 "thesisplanet/zencoder": "dev-master"
  2. 在 application.config.php 中将 'Zencoder' 添加到所需的模块列表中
  3. 将 vendor/thesisplanet/zencoder/config/zencoder.local.dist.php 复制到 config/autoload/zencoder.local.php

配置

  1. 在 config/autoload/zencoder.local.php 中设置正确的 API 密钥

用法

从实现 ServiceLocatorAwareInterface 接口的一个类中访问 Zencoder

  $zencoder = $this->getServiceLocator()->get('ThesisPlanet\ZencoderService');
  This will return an instance of Services_Zencoder.
  
  From there, you can interact with all of the Zencoder goodness as briefly documented at
  https://github.com/zencoder/zencoder-php