ibnusyuhadap3 / slim-tegar

Slim Tegar is a package that designed for integrating PHP-DI and Slim Framework version 3.x.x. This package is an Slim Bridge advanced of http://php-di.org/doc/frameworks/slim.html. You don't need to extends any class of PHP-DI or Slim just to make container configuration. Slim Tegar also providing the easy way to implement Closure and MVC routes.
MIT License
1 stars 0 forks source link

custom config file #1

Open rodmar35 opened 6 years ago

rodmar35 commented 6 years ago

Hello,

Thanks a lot for this repo. First note, i'm a newbie whith php-di ... ;-)

As you explain, i try to add custom config file by :

In Example Controller I had

use Interop\Container\ContainerInterface; ... public function index($response, ContainerInterface $container){ $response->write($container->get("settings.displayErrorDetails")); return $response; } On front, $response display always "true" while in config.php httpVersion is false. And when a try tracing settings.ibnu with $response->write($container->get('settings.ibnu')); i'v got this error "No entry or class found for 'settings.ibnu';

File /slimtegar/vendor/php-di/php-di/src/DI/Container.php Line 128

Could you help me please. Thanks RodMar35

rodmar35 commented 6 years ago

Finally, i success by calling the good method.

$response->write($container->get("settings.displayErrorDetails")); trace settings in ibnusyuhadap3/slim-tegar/blob/master/src/defaultConfiguration/settings.php

$response->write($container->get('settings')['displayErrorDetails']); trace settings in config/config.php

Do you confirm it ? Thanks RodMar35

ibnusyuhadap3 commented 6 years ago

Dear friend, Sorry late to respond. I just read your email due to busy to prepare my dissertation. Thank you for your email. Soon when I finish, I will be back to repair.

Pada tanggal Kam, 2 Agt 2018 15.21, rodmar35 notifications@github.com menulis:

Finally, i success by calling the good method.

$response->write($container->get("settings.displayErrorDetails")); trace settings in ibnusyuhadap3/slim-tegar/blob/master/src/defaultConfiguration/settings.php

$response->write($container->get('settings')['httpVersion']); trace settings in config/config.php

Do you confirm it ? Thanks RodMar35

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ibnusyuhadap3/slim-tegar/issues/1#issuecomment-409846568, or mute the thread https://github.com/notifications/unsubscribe-auth/AG1tgWbDjxytwBIcb6FdGp6_ZJeqLyseks5uMrZ2gaJpZM4Vqv6R .