2017 © Pedro Peláez
 

library phalcon-config-loader-for-yaml

Phalcon Config Loarder for Yaml

image

ienaga/phalcon-config-loader-for-yaml

Phalcon Config Loarder for Yaml

  • Tuesday, August 15, 2017
  • by ienaga
  • Repository
  • 1 Watchers
  • 1 Stars
  • 5,082 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 4 % Grown

The README.md

Phalcon Config Loarder for Yaml

Build Status, (*1)

Latest Stable Version Total Downloads Latest Unstable Version License, (*2)

Loads all the yml in the directory of the app/config., (*3)

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();

The Versions

15/08 2017

dev-master

9999999-dev https://github.com/ienaga/PhalconConfig

Phalcon Config Loarder for Yaml

  Sources   Download

MIT

The Development Requires

by Toshiyuki Ienaga

config yaml phalcon

15/08 2017

1.0.0

1.0.0.0 https://github.com/ienaga/PhalconConfig

Phalcon Config Loarder for Yaml

  Sources   Download

MIT

The Development Requires

by Toshiyuki Ienaga

config yaml phalcon