承接 hopeter1018/sequential-counter-format-bundle 相关项目开发

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

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

hopeter1018/sequential-counter-format-bundle

Composer 安装命令:

composer require hopeter1018/sequential-counter-format-bundle

包简介

This bundle aims to generate value for doctrine entities.

README 文档

README

Introduction

This bundle aims to generate value for doctrine entities.

Installation

Require the package

composer require hopeter1018/sequential-counter-format-bundle

Add to kernel

Symfony 4+ or Symfony Flex

Add /config/bundles.php

return [
  ...,
  HoPeter1018\SequentialCounterFormatBundle\HoPeter1018SequentialCounterFormatBundle::class => ['all' => true],
];

Symfony 2+

Add /app/AppKernel.php

$bundles = [
  ...,
  new HoPeter1018\SequentialCounterFormatBundle\HoPeter1018SequentialCounterFormatBundle(),
];

Config

thru config.yml / config.yaml

ho_peter1018_sequential_counter_format:
  # managers: ['default'] # add / modify if you are not using 'default'
  rules:
    _rule_alias_:
        entity_class: 'Your\Bundle\Entity\EntityClass'
        property: 'yamlTargetPropertyName'
        format: '__SEE_FORMAT_SECTION__'

thru Doctrine Annotation

namespace Your\Bundle\Entity;

use HoPeter1018\SequentialCounterFormatBundle\Annotations as Scf;

/**
 * Class docblock
 *
 * @Scf\ClassRule(settings={
 *   "classAnnotationTargetPropertyName"={"format"="__SEE_FORMAT_SECTION__", "batchPrefix"="[site.id]"},
 * })
 */
class EntityClass {

  /**
   * @Scf\PropertyRule("__SEE_FORMAT_SECTION__")
   * @ORM\Column(type="string", length=255)
   */
  private $propertyAnnotationTargetPropertyName;

  /**
   * @ORM\Column(type="string", length=255)
   */
  private $classAnnotationTargetPropertyName;

  /**
   * declared in the above section: `thru config.yml / config.yaml`
   */
  private $yamlTargetPropertyName;

}

Usage

Format Placeholder

Type Format Description
Sequence %d same as sprintf
Only %d is supported right now.
Date {format_character} same as date
EACH Date format should wrap separately.
Currently supports: YyMmWdwNHi
if you want 19970101, you should do {Y}{m}{d}
Property [property_name] Powered by Symfony's PropertyAccess Component

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固