“Invalid Service Definition” when using DI->Get Phalcon PHP

前端 未结 3 2010
暗喜
暗喜 2021-01-24 15:43

This question is related to Appending multiple config arrays in PhalconPHP

I am trying to get retrieve an object from the DI using the get method.

The object is

3条回答
  •  灰色年华
    2021-01-24 16:28

    Try this instead in the set:

    $di->set('config', function() {
       ...
       return new \Phalcon\Config($new_array);
    });
    

提交回复
热议问题