StringGeneratorBundle:使用属性注释为ID或键生成随机字符串

时间:2021-05-10 15:59:31
【文件属性】:
文件名称:StringGeneratorBundle:使用属性注释为ID或键生成随机字符串
文件大小:23KB
文件格式:ZIP
更新时间:2021-05-10 15:59:31
PHP StringGeneratorBundle 此捆绑包使您可以在实体属性上自动生成唯一的随机字符串,这对于创建键非常有用。 通过使用Doctrine的prePersist回调,StringGenerator在实体保留之前将生成的字符串添加到属性中。 它还检查字符串对于该属性是否唯一(以防万一),如果不是,则自动生成一个新字符串。 安装 运行: composer require vivait/string-generator-bundle:^3.0来安装捆绑软件。 如果您使用的是PHP 5.3或5.4,则可以使用旧版本vivait/string-generator-bundle:^1.1 更新您的AppKernel : public function registerBundles () { $ bundles = array( . . . new
【文件预览】:
StringGeneratorBundle-master
----src()
--------Vivait()
----spec()
--------Vivait()
----.travis.yml(726B)
----LICENSE(1KB)
----README.md(6KB)
----.gitignore(859B)
----_config.yml(25B)
----composer.json(943B)

网友评论