intaro / hstore-bundle
HStoreBundle 包含 DBAL 类型 hstore 并注册 Doctrine 类型 hstore
v0.0.4
2014-11-10 15:07 UTC
Requires
- php: >=5.4.4
- symfony/framework-bundle: ~2.3
This package is auto-updated.
Last update: 2024-09-14 23:56:08 UTC
README
PostgreSQL 模块 hstore 允许在单个 PostgreSQL 值中存储键/值对集合。更多信息请访问 这里.
HStoreBundle 包含 DBAL 类型 hstore 并注册 Doctrine 类型 hstore.
安装
HStoreBundle 需要 Symfony 2.3 或更高版本。
在您的 composer.json 文件中要求此包
{
"require": {
"intaro/hstore-bundle": "~0.0.2",
}
}
```
Register the bundle in `AppKernel`:
```php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
//...
new Intaro\HStoreBundle\IntaroHStoreBundle(),
);
//...
}
```
Install the bundle:
```
$ composer update intaro/hstore-bundle
```
### Installing the PHP extension
The package contains two versions of the `HStoreParser` as PHP extension. PHP extension is optional but as it brings some nice performance improvements, you might want to install it in your production environment.
#### PHP extension (PHP-CPP)
The first extension is written in [PHP-CPP](http://www.php-cpp.com) thats why you should [install PHP-CPP](http://www.php-cpp.com/documentation/install) before extension compiling.
The extension compiling:
```bash
cd path/to/Intaro/HStoreBundle/Resources/phpcpp
make
sudo make install
```
Finally, enable the extension in your `php.ini` configuration file:
```ini
extension = hstorecpp.so # For Unix systems
```
#### PHP extension (Zephir)
The second extension is written in [Zephir](http://zephir-lang.com) thats why you should [install Zephir](http://zephir-lang.com/install.html) before extension compiling.
```bash
cd path/to/Intaro/HStoreBundle/Resources/zephir
zephir install
```
Finally, enable the extension in your `php.ini` configuration file:
```ini
extension = hstore.so # For Unix systems
```