grape-fluid/configuration

dev-master 2017-11-23 14:06 UTC

This package is auto-updated.

Last update: 2024-04-15 10:43:11 UTC


README

PHP from Packagist Build Status Code coverage Licence Downloads this Month Downloads total Latest stable

Install

composer require grape-fluid/configuration

Version

Registration

extensions:
    configuration: Grapesc\GrapeFluid\Configuration\Bridges\ConfigurationDI\ConfigurationExtension

Advanced settings

services:
    # Service that implements Grapesc\GrapeFluid\Configuration\IStorage
    - Grapesc\GrapeFluid\Configuration\Storage\NetteDatabase('your_configuration_table_name')
    # Optional - Service that implements Grapesc\GrapeFluid\Configuration\Crypt\ICrypt
    - Grapesc\GrapeFluid\Configuration\Crypt\OpenSSLCrypt('your_secret_token')

Example

parameters:
    testapi:
        url: @c::val(test.api.url)
        port: @c::val(test.api.port)
        username: @c::val(test.api.username)
        password: @c::val(test.api.password)
        debug: @c::val(test.api.debug)
        endpoints:
            test: @c::con(%testapi.url%, /getTest)    

configuration:
    test.api.url: [default: "http://localhost/api", description: "API base path"]
    test.api.port: [default: 80, description: "API port", type: integer, nullable: false]
    test.api.username: [default: "admin", description: "API username"]
    test.api.password: [description: "API password", secured: true]
    test.api.debug: [default: false, description: "Enable debug", type: boolean, nullable: false]