yii2-module / yii2-insee-sirene
一个将INSEE的SIRENE数据库数据结构化的模块
7.0.5
2024-07-31 16:55 UTC
Requires
- php: >=8.0
- php-extended/php-api-fr-insee-sirene-object: ^7
- php-extended/php-basic-console-logger: ^7
- php-extended/php-http-message-factory-psr17: ^7
- php-extended/php-multiple-logger: ^7
- yii2-extended/yii2-module-metadata-object: ^7
- yii2-extended/yii2-psr3-logger-bridge: ^7
- yii2-module/yii2-insee-ban: ^7
- yii2-module/yii2-insee-catjur: ^7
- yii2-module/yii2-insee-naf: ^7
- yii2-module/yii2-log: ^7
- yii2-module/yii2-module-helper: ^7
- yiisoft/yii2: ^2
Requires (Dev)
README
一个将INSEE的SIRENE数据库数据结构化的模块。
安装
此库的安装通过composer进行,并且所有类的自动加载通过它们的自动加载器进行。
- 从他们的网站下载
composer.phar
。 - 然后运行以下命令将此库作为依赖项安装
php composer.phar install yii2-module/yii2-insee-sirene ^7
配置
此模块需要在配置级别设置以下组件
- 'db_insee_sirene' 应该是一个
\yii\db\Connection
如果您已经有一个数据库连接,您可以使用以下技巧
'db_insee_sirene' => function() { return \Yii::$app->get('db'); },
其中 'db' 是您数据库连接的ID。
此模块使用以下参数在配置级别设置
- 无
然后模块应该按以下方式配置(在 console.php
或 web.php
中)
$config = [
...
'modules' => [
...
'insee-sirene' => [
'class' => 'Yii2Module\Yii2InseeSirene\InseeSireneModule',
],
...
],
...
];
许可证
MIT(见 许可证文件)