daviddeutsch / redbean-prefix
当您绝对需要 RedBeanPHP 中的前缀时
dev-master
2014-04-05 14:13 UTC
Requires
- gabordemooij/redbean: >=3.2,<4.0
Suggests
- daviddeutsch/redbean-instance: Let's you have multiple RedBean instances running alongside eachother.
This package is not auto-updated.
Last update: 2024-09-28 14:52:26 UTC
README
在理想的世界里,我们不需要做这件事。然而,有时我们不得不这样做。
这是一个 RedBean 插件,它会自动将前缀注入到您的表名中。
用法
// Include or autoload the files in this library R::ext( 'prefix', array('RedBean_Prefix', 'prefix') ); R::prefix('my_prefix_'); // If you want to inject it into another instance of RB $r2db2 = R::instance(); $r2db2::prefix('my_other_db_', $r2db2);