承接 bitverse/identicon-bundle 相关项目开发

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

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

bitverse/identicon-bundle

最新稳定版本:1.0.2

Composer 安装命令:

composer require bitverse/identicon-bundle

包简介

A Symfony 2 bundle for bitverse/identicon.

README 文档

README

This package contains a bundle which integrates bitverseio/identicon with a Symfony application.

Installation

Download the bundle using composer:

$ composer require bitverse/identicon-bundle

Enable the bundle in app/AppKernel.php:

<?php

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Bitverse\IdenticonBundle\BitverseIdenticonBundle(),
        );

        // ...
    }

    // ...
}

Configuration

BitverseIdenticonBundle allows you to specify the preprocessor and generator class, as well as the background color for the identicons. Here's the default configuration in YAML:

bitverse_identicon:
    preprocessor:
        class: Bitverse\Identicon\Preprocessor\MD5Preprocessor
    generator:
        class: Bitverse\Identicon\Generator\PixelsGenerator
        background_color: #EEEEEE

Usage

The bundle provides the identicon service which is an instance of Bitverse\Identicon\Identicon. You can use it to create icons directly:

$svg = $this->get('identicon')->getIcon('helloworld');

Or you can inject it as a dependency should you need it:

services:
    my_service:
        arguments:
            - @identicon

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-13