icy
icy

Reputation: 1446

how retrieve array returned by config in zend framework 2

How I can get the array returned by config/autoload in zend framework 2?

#config/autoload/myconfig.local.php

return array('foo' => 'bar');

I noticed if the file have not "return array()" an exception will throw

Upvotes: 0

Views: 31

Answers (1)

danopz
danopz

Reputation: 3408

This config is merged automatically in the whole app config. You can get this by calling

$sl->get('config')

on your ServiceManager. There will be all the config you have.

Upvotes: 1

Related Questions