From 5b603bc8016e439029e488871381d09c5e34fbcd Mon Sep 17 00:00:00 2001 From: Sebastian Rapetti Date: Sat, 10 Sep 2016 12:00:06 +0200 Subject: [PATCH] Update README.md and DIResolver fix --- README.md | 17 ++++++++++++++++- src/Linna/DI/DIResolver.php | 13 ++++++++----- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0373bda4..c689f446 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,19 @@ A little MVC framework for undersand and learn PHP programming -Soon docs +Features: + + * Model View Controller + * Session Managment and Login + * Router + * Dependency Injections + * Storage Manager for data base and cache + * PSR4 Autoloader + +To Do: + + * Documentation + * Unit Testing + * Session and Storage Manager refactoring + * Router refactoring + * PSR7 support diff --git a/src/Linna/DI/DIResolver.php b/src/Linna/DI/DIResolver.php index 83870d68..acf15306 100644 --- a/src/Linna/DI/DIResolver.php +++ b/src/Linna/DI/DIResolver.php @@ -13,23 +13,26 @@ class DIResolver { - private $class; + //private $class; + private $cache = array(); + private $dependencyTree = array(); public function __construct() { } - public function resolve($class) + public function resolve($resolveClass) { - $this->class = $class; + //$this->class = $class; - $this->buildDependencyTree(0, $class); + $this->buildDependencyTree(0, $resolveClass); $this->buildObjects(); - return $this->getCache($this->class); + //return $this->getCache($this->class); + return $this->getCache($resolveClass); } public function cacheUnResolvable($name, $object)