ienaga/phalcon-config-loader-for-yaml
Composer 安装命令:
composer require ienaga/phalcon-config-loader-for-yaml
包简介
Phalcon Config Loarder for Yaml
README 文档
README
Loads all the yml in the directory of the app/config.
Version
PHP: 7.0.x, 7.1.x, 7.2.x
Phalcon: 3.x
Composer
{
"require": {
"ienaga/phalcon-config-loader-for-yaml": "2.*"
}
}
BASE_PATH and APP_PATH
all: application: appDir: !app_path / controllersDir: !app_path /controllers/ modelsDir: !app_path /models/ migrationsDir: !app_path /migrations/ viewsDir: !app_path /views/ pluginsDir: !app_path /plugins/ libraryDir: !app_path /library/ cacheDir: !base_path /cache/ baseUri: /project_name/ dev: image: "https://dev.example.com" stg: image: "https://stgexample.com" prd: image: "https://example.com" test: image: "https://test.example.com" local: image: "https://local.example.com"
app/config/config.php
$loader = new Phalcon\Config\Adapter\Yaml\Loader(); return $loader ->setIgnore(["routing"]) // ignore yml names ->setEnvironment("stg") // default dev ->setBasePath(realpath(dirname(__FILE__) . "/../..")) ->load();
统计信息
- 总下载量: 5.5k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-10-14