protected function instanceClass($dir, $name, $propertiesEsp= NULL){
        require_once $dir;
        $dir= explode("/", $name);
        $class= $dir[count($dir) - 1];
        $instance= new $class();
        if($propertiesEsp != NULL){
            $this->app->dependenciesEngine->injectProperties($instance, $propertiesEsp);
        }
        return $instance;
    }