uam / propel-addressable-behavior

一个将地址相关字段添加到表的 Propel 行为。

1.0.3 2013-11-30 10:23 UTC

This package is auto-updated.

Last update: 2024-08-29 03:15:48 UTC


README

Addressable 行为向表中添加地址相关字段。

要求

此行为需要 Propel >= 1.6.0。

安装

通过将以下行添加到您的 composer.json 文件中获取代码:

	require: {
		"opichon/propel-addressable-behavior": "dev-master"
	}

然后运行

php composer.phar install

或者

php composer.phar update

配置

将以下内容添加到您的 propel.inibuild.properties 文件中。

propel.behavior.addressable.class: AddressableBehavior

使用方法

在 Propel 模式

将行为添加到相关表的模式定义中

<?xml version="1.0" encoding="utf-8"?>
<database name="default" namespace="My\App\lib" defaultIdMethod="native">
    <table name="document" phpName="Document" idMethod="native">
        <!-- you column definitions -->
        <behavior name="addressable" />
    </table>
</database>