public function getService($name, $class= '', $path= '', $params= array ()) {
        $service= null;
        if (!$this->services->has($name) || !is_object($this->services->get($name))) {
            if (empty ($class) && isset ($this->config[$name . '.class'])) {
                $class= $this->config[$name . '.class'];
            } elseif (empty ($class)) {
                $class= $name;
            }
            $className= $this->loadClass($class, $path, false, true);
            if (!empty($className)) {
                $service = new $className($this, $params);
                if ($service) {
                    $this->services->add($name, $service);
                    $this->$name= $this->services->get($name);
                }
            }
        }
        if ($this->services->has($name)) {
            $service = $this->services->get($name);
        } else {
            if ($this->getDebug() === true) {
                $this->log(xPDO::LOG_LEVEL_DEBUG, "Problem getting service {$name}, instance of class {$class}, from path {$path}, with params " . print_r($params, true));
            } else {
                $this->log(xPDO::LOG_LEVEL_ERROR, "Problem getting service {$name}, instance of class {$class}, from path {$path}");
            }
        }
        return $service;
    }