<?php
require __DIR__.'/vendor/autoload.php';
$c = new Respect\Config\Container(__DIR__.'/conf.ini');
$c->connection = function() use($c) {
return new PDO($c->db_dsn, $c->db_user, $c->db_pass);
};
echo get_class($c->connection);
And I had...
PHP Warning: trim() expects parameter 1 to be string, object given in library/Respect/Config/Container.php on line 272
...
PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Item connection not found' in library/Respect/Config/Container.php:103
If you create a container object without pass a file/string on constructor, it works.
well, I created a test case (use it to break tests of version 1.0.1) and a possible fix.
Hi again! I think that a feature documented on README is not working. I wrote the same example found in the doc:
conf.ini:
index.php:
And I had...
If you create a container object without pass a file/string on constructor, it works.
well, I created a test case (use it to break tests of version 1.0.1) and a possible fix.
:cloud: