定制 badlamer/propel-uuid-behavior 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

badlamer/propel-uuid-behavior

Composer 安装命令:

composer require badlamer/propel-uuid-behavior

包简介

Propel behavior that helps you to set fixed UUID

README 文档

README

Helps you add UUID for propel ActiveRecord

Build Status

Requirements

This behavior requires Propel >= 1.6.0 and Ramsey\Uuid for PHP >= 5.4

Installation

Get the code by cloning this repository, or by using Composer (recommended):

{
    "require": {
        "badlamer/propel-uuid-behavior": "dev-master"
    }
}

Then, if you don't use Composer, or an autoloader in your application, add the following configuration to your build.properties or propel.ini file:

propel.behavior.uuid.class = vendor.badlamer.propel-uuid-behavior.src.UuidBehavior

Note: vendor.badlamer.propel-uuid-behavior.src.UuidBehavior is the path to access the UuidBehavior class in "dot-path" notation.

Then declare the behavior in your schema.xml:

<table name="person">
  <!--
    Explict define a column, else the beavior would create a colum called "uuid".
    We need to have at least one column with primaryKey="true" to avoid the error:
      >>Fatal error: Uncaught Error: Call to a member function getPhpName() on null in [...] vendor/propel/propel1/generator/lib/builder/om/QueryBuilder.php:478<<
  -->
  <column name="id" type="CHAR" size="36" required="true" primaryKey="true" />
 
  <!--
    We are linking the column with the name >>id<< to the behavior.
    Now the uuid generation is used for each new created entity.
  -->
  <behavior name="uuid">
    <parameter name="name" value="id" />
  </behavior>
</table>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-11-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固