Skip to content

Category in Gateways config #5

@lvenier

Description

@lvenier

today app config is like this :
(new SolrClient('default', 'localhost', 'audit'))->setTimeout(10),
new MySqlConnection('default', '127.0.1.10', 'audit', 'audit', 'audit')

I think Filer config is simpler. Can we not have something like :

(new BackendConfig())->registerBackend(
(new Backend())
->setDriver('pdo_mysql')
->setName('bck8')
->setCategories([
CATEGORY_RUSTEE,
])
->setHost('127.0.0.1)
->setDbname('bck8')
->setUser('toto')
->setPort(3306)
->setPassword('toto'),
true
),
(new BackendConfig())->registerBackend(
(new Backend())
->setDriver('solr')
->setName('bck9')
->setCategories([
File::CATEGORY_GLAD,
])
->setHost('127.0.1.10')
->setDbname('toto')
->setPort(80)
->setPassword('toto'),
false
),
(new BackendConfig())->registerBackend(
(new Backend())
->setDriver('pdo_mysql')
->setName('tmp1')
->setCategories([
CATEGORY_A,
CATEGORY_B
])
->setHost('127.0.1.10')
->setDbname('tmp')
->setUser('toto')
->setPort(3306)
->setPassword('tata'),
false
),
(new BackendConfig())->registerBackend(
(new Backend())
->setDriver('memcached')
->setName('bck9')
->setCategories([
File::CATEGORY_TMP,
])
->setHost('127.0.1.10')
->setPort(11211)
false
),
(new BackendConfig())->registerBackend(
(new Backend())
->setDriver('pdo_postgresql')
->setName('caca')
->setCategories([
CATEGORY_INVOICE_TEMP,
])
->setHost('127.0.1.10')
->setDbname('tmp')
->setUser('toto')
->setPort(3306)
->setPassword('tata'),
false
),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions